Chess

A barebones version of command-line Chess for 2 players.

Although currently missing the feature that declares Check, it is completely playable and includes all special moves(castling, en passant, promotion, and a pawn's double step on its first move).

TODO:

  1. Declare Check/Mate
  2. En-Passant(first-turn) restriction

Gameplay

The game is played on a standard 8x8 board as shown below.

  A B C D E F G H  
8 

A user will first be prompted to select a chess piece belonging to his/her color. Once a the chess piece has been chosen, he/she will then be prompted to select a space to move that chess piece.

Basic Commands

To enter a command, simply type in the X and Y coordinate without any spaces or commas seperating the two. Eg. A2, H7 or B6 (Lowercases are also accepted).

If a command is invalid, the use will be alerted and prompted again until a valid command is entered.

Special moves

All special moves (castling, en passant, promotion, and a pawn's double step on its first move) are recognized and allowed.

Note:

i) To initialize Castling, select Rook THEN select King. Restricted by Check not applied yet.

ii) Restriction of En-Passant as first turn since double-stepped not applied yet.

Installation

To install:

$ gem install chess_vwong

Usage

Once gem has successfully installed, simply type:

$ chess_vwong    

Or clone the repo locally and run:

$ rake play  

Contributing

  1. Fork it ( https://github.com/[my-github-username]/chess_vwong/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request