Cold Hard Chess
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
Cold Hard Chess is a programming language which looks like chess notation.
Instructions
Cold Hard Chess operates on a grid on 64 registers a1-a8, b1-b8, ..., h1-h8, all initialised with 0.
To modify the register values, the six chess pieces are used:
Piece | Syntax | Instruction |
---|---|---|
Pawn | xy | Sets x to y. |
Knight | Nxy | Sets x to x plus y. |
Rook | Rxy | Sets x to x minus y. |
Bishop | Bxy | Sets x to x times y. |
Queen | Qxy | Sets x to x divided by y, rounded down. Sets y to the remainder. |
King | Kxy | If x equals y, skip the next instruction. |
Pieces marked 'y' may have an 'x' before them. This is a capture, or a constant in CHC. Here is the table of constants for all pieces:
a | b | c | d | e | f | g | h | |
1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
3 | 16 | 32 | 48 | 64 | 80 | 96 | 112 | 128 |
4 | 144 | 160 | 176 | 192 | 208 | 224 | 240 | 256 |
5 | 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 |
6 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 |
7 | -16 | -32 | -48 | -64 | -82 | -96 | -112 | -128 |
8 | -144 | -160 | -176 | -192 | -208 | -224 | -240 | -256 |