Skip to content

heyitstowler/Chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Ruby Chess#

To get started

  1. $ git clone https://github.com/ctowler157/Chess.git
  2. $ cd Chess
  3. $ bundle install
  4. Run the command $ ruby chess.rb to start the game. You should see a title screen

  5. Enter the number of players and press enter to begin.

Gameplay

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.

Making a move

  • 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.

    $ />
  </li>
</ul>
<h3>Check, Checkmate, and winning the game</h3>
<ul>
  <li>
    <p>
      If a move threatens a player's King, the game will display a warning at the bottom to reflect it.  The player's moves will be limited to those that remove the threat to the King.
    </p>
    <img src=
  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages