shouldn't this be illegal?

Sort:
glpozza
I learned that you can't castle if any of the squares in your path are under attack, but my opponent just did this: On 5 I had a knight attacking the rook; Black castled on that same side. 1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4. Ng5 Bc5 5. Nxf7 O-O 6. Nxd8+ Nd5 7. Bxd5+ Rf7 8. Bxf7+ Kf8 9. Qf3 Nxd8 10. Bh5+ Nf7 11. Qxf7# 1-0
Alramech
glpozza wrote:
I learned that you can't castle if any of the squares in your path are under attack, but my opponent just did this: On 5 I had a knight attacking the rook; Black castled on that same side. 1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4. Ng5 Bc5 5. Nxf7 O-O 6. Nxd8+ Nd5 7. Bxd5+ Rf7 8. Bxf7+ Kf8 9. Qf3 Nxd8 10. Bh5+ Nf7 11. Qxf7# 1-0

Here is the game board for ease:

 

The rule is that the squares which the king must pass through to castle cannot be under attack.  Here, you rightfully point out that you are attacking his rook, but his king does not move through that square in order to castle.  Therefore, castling is legal.

 

Alramech

Taken from the site's page on castling:

  • Your king can not have moved! Once your king moves, you can no longer castle, even if you move the king back to the starting square. Many strategies involve forcing the opponent’s king to move just for this reason! 
  • Your rook can not have moved! If you move your rook, you can’t castle on that side anymore! Both the king and the rook you are castling with can’t have moved! 
  • Your king can NOT be in check! Though castling often looks like an appealing escape, you can’t castle while you are in check! Once you are out of check, then you can castle! Unlike moving, being checked does not remove the ability to castle later! 
  • Your king can not pass through check! If the square the king moves over, or moves to would put you in check, you can’t castle! You’ll have to get rid of that pesky attacking piece first!

 

Strangemover

Nice win. Castling was legal there because it is only if the squares which the king passes through are attacked, not the rook. 

glpozza

Thank you all for the answers. :)

Displayname123

So it is legal for your opponent to castle because only the opponents rook is attacked, while the opponents king is still safe. It is legal to castle, only that it is a blunder of queen.

batgirl

Nice job guys!