You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
28 lines
1.1 KiB
Chess program
|
|
=============
|
|
This simple application allows the user to play chess. Moves can be made by human or computer.
|
|
|
|
GUI
|
|
===
|
|
The GUI shows a 2D grid of colored chess squares and whichever pieces are in play (it starts with a new game, ready to play).
|
|
|
|
Text feedback is given for the game state (who's turn it is, and if it is checkmate or stalemate).
|
|
|
|
The user makes a move by clicking the source and destination square (for castling and en passant move the king or pawn to its natural destination square).
|
|
Any click (if it is one of your pieces) highlights that square
|
|
If some square highlighted, then:
|
|
if second click is legal move, do it and unhighlight
|
|
otherwise unhighlight with no move
|
|
else unhighlight without moving
|
|
|
|
|
|
An "AI move" button makes the computer move (choose a random move from those available).
|
|
|
|
An "Undo" button takes back the most recent move.
|
|
|
|
A "Reset" button puts the board in its correct configuration for the first turn of the game.
|
|
|
|
Game rules
|
|
==========
|
|
Standard chess rules apply. The 3-move-repetition, 50-move rule, and underpromotion are not implemented in this version.
|