3

I've got a simple question, that I'm having difficulty finding an answer for...

If it is possible to castle (I know the conditions for it), and I decide to move the king to the square where it would end up in castling, do I have to "take the castling", i.e. move the rook too?

  • 1
    It is called squares in chess not tiles. Also if you need to know how pieces move then you should read the Laws of Chess, articles 1-3. Relying on unofficial sources like wikipedia and random articles on the web will likely result in a coding error. – IA Petr Harasimovic Jan 16 '16 at 15:43
12

Yes.

Otherwise this would be an illegal move because during castling the king moves two squares, but apart from castling it is only allowed to move one square.

| improve this answer | |
  • 1
    Ah silly me, the king moves TWO tiles in castling! I feel stupid now! (I've never done castling, just read some articles about it - as I need to program a chess client). – user38725 Jan 16 '16 at 11:15
5

This is a very good question indeed but it took me a long time to understand what you wanted.

So you are programming an interface and you wonder how the computer can tell if a player wants to play Kg1 or 0-0 taking short castle as an example. The answer is that if both moves are legal then none of them takes precedence and the player can play whichever they desire. You then need a device how the player can make their intention clear to the computer. For instance dragging their king outside the board could do the castling.

As BlindKungFuMaster explains in standard chess you do not have to worry about it since the King has to be on e1 for a castle to be a legal move. Then there is no other legal move that could take the King on g1 thus there is no ambiguity.

In Fisher Chess (chess 960) however you can have an initial position with the King on f1 and a Rook on h1. In this case both Kf1-g1 and 0-0 would be legal moves. Even for over the board play the Laws (Appendix F) recommend a special procedure for castling to avoid misunderstanding.

| improve this answer | |
1

Yes, moving both the king and the rook are necessary to castle.

| improve this answer | |
1

Yes, but one additional point: If you have started to place the king on g1, for example, but you change your mind AND you have not taken your hand off it, you can still move it one square to another square as long as you have not also touched the rook.

| improve this answer | |
  • Answer not directly relevant for someone referring to online play, as in this question. – Grade 'Eh' Bacon Sep 12 '19 at 15:09
  • WHERE does he mention online play in the original question because I still do not see it? Besides, on the online sites that I have played on, as soon as you move the king two squares, it completes the rook move automatically. – PhishMaster Sep 12 '19 at 15:15
  • I am assuming that you just downvoted me for your mistake too? Nice. – PhishMaster Sep 12 '19 at 15:16
1

I know this is a late answer to a question that got bumped, but there are a couple of essential points to add to @BlindKungFuMaster's answer:

  1. There can be no pieces on the squares in between the king and the castling rook (So knight/bishop on the kingside, and knight/bishop/queen on the queenside).
  2. It must be the first move for both pieces involved - So if you want to castle to the kingside, and either the rook on H1 or the king has moved off of their square and then back, you cannot castle to that side. If the king has not moved, but the rook on H1 has, and the rook on A1 has not, then you can still castle queenside.*

*- Note: Square reference assumes castling as White.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.