simulchess ========== Summarised rules: ---------------- Players simultaneously submit legal moves, which are then played out according to the usual rules of chess. You can only take with a piece if on the last turn that piece was already threatening the square the enemy piece is on. These "established" threats are the only ones which count. If you try to flee from an established threat, you have to submit a different backup move to be used if the opponent does try to take that piece. If two pieces move simultaneously to the same square, both are taken. Pawns can never take when moving forward, however, so you have to submit a backup move when moving a pawn forward to a square your opponent could move to. More detailed rules follow (although I'd advise just playing a few games against the AI to get the hang of the rules). Definitions: ----------- A piece "threatens" a square if it could legally take an enemy piece in that square, were the current contents of the square to be replaced by an enemy piece. A "threat" is a legal move of form "Piece A takes piece B". A threat is considered to be "established" if (i) in the previous board state A threatened the square which B currently occupies, and the threat is not an en passant capture; or (ii) the square which B currently occupies has been revealed, in the following sense: in the previous board state a piece of B's colour (which may be B itself) blocked A from moving to B's current square, and now A can move unblocked in that direction to that square; or (iii) the move is an en passant capture, and B moved forwards two squares on the previous turn while A did not move. Note that in cases (i) and (ii), it may be that A moved on the previous turn. Rules: ----- All submitted moves must be legal from the current board position according to the rules of standard chess, and may be of the form "A takes B" only if the threat is established. On each turn, the players each submit a "primary" move. In the following two cases, the primary move might turn out to be be invalid, and the player must also submit a "backup" move to be used instead: (I) If the player's primary move is to move a piece which is under established threat, the player should submit a backup move which does not involve moving that piece. (II) If the player's primary move is to move a pawn forward to a square to which the opponent could move a piece, the player should submit a backup move which is different from the primary move. A castling may be submitted if and only if neither of the pieces involved and none of the squares in between are under established threat, and neither piece has moved. If one player's primary move is of the form "A takes B" while the other player's primary move involves moving B and isn't "B takes A", the second player's backup move is used instead. If a player's primary move is to move a pawn forwards to a square S, and the other player's move is to move a piece to S, then the first player's secondary move is used instead. Exception: if both pieces are pawns, the pawn belonging to the side of the board the target square is on gets to move while the other player's secondary move is used. The moves are then carried out simultaneously according to the rules of ordinary chess. The only conflicts which can arise are when the moves are of form {A takes B; B takes A} or {A moves to S; B moves to S} where S is an unoccupied square. In either case, both A and B are captured and removed from play. The game is won by capturing the opponent king. If both kings are taken simultaneously, the game is a draw. -- Martin Bays 2012