This application serves to generate one of the possible 960 starting positions of the chess variant Chess960 (Fischer-Random-Chess).
The rules are exactly the same as in standard chess. Because of a different starting position castling works a little bit different.
In Chess960, each player may castle once per game, the same as standard chess,
moving both the king and a rook in a single move; however, the castling rules
were reinterpreted in Chess960 to support the different possible initial positions
of the king and rook. After castling, the king and rook final positions are exactly
the same as they are in standard chess. Thus:
After a-side castling, the king finishes on the c-file (c1 for White, c8 for Black) and the a-side rook finishes on the d-file (d1 for White, d8 for Black). The move is notated 0-0-0 and is known as queenside castling in standard chess.
After h-side castling, the king finishes on the g-file and the h-side rook finishes on the f-file. The …