#Ruby Chess#
$ git clone https://github.com/ctowler157/Chess.git
$ cd Chess
$ bundle install
-
Run the command
$ ruby chess.rb
to start the game. You should see a title screen - Enter the number of players and press enter to begin.
Gameplay is controlled using the arrow keys and the enter key, though you will occasionally use the keyboard when prompted. You can press Ctrl + C at any point to exit the game.
-
Use the arrow keys to navigate the cursor, which is blue. Press enter when you have navigated to the piece you wish to move. If you press enter on an opponents piece or an empty square, the game will display a warning message and you will need to select again.
-
Selecting a piece with enter will turn that piece's square red. You can now navigate the cursor to select the position you wish to move the piece to. Selecting an invalid move will cause the game to display a warning and you will need to select a piece again.
-
The move will then pass to the opposing player.
-
If a pawn makes it to the last row on the board, you will be prompted to promote it into another piece. You have the choice to select either a Queen, a Knight, a Rook, or a Bishop. If you select either the Rook or the Bishop, the game will correct your mistake and give you a Queen.
-
If a player is in check and has no possible moves to remove the threat, that player is in checkmate. The opposing player wins, and the game ends.