A classic two-player chess game built in Ruby and played directly in your terminal.
Chess CLI brings the fundamentals of chess to the command line with a simple, interactive interface. Challenge a friend, make your moves, save your progress, and continue the game whenever you are ready.
- ✅ Two-player local chess gameplay
- ✅ Checkmate detection
- ✅ Castling
- ✅ Save an in-progress game
- ✅ Load a previously saved game
- ✅ Quit safely at any time
- ✅ Interactive command-line board
Make sure Ruby and Bundler are installed on your machine.
Clone the repository and install the project dependencies:
git clone https://github.com/sufiancodes/Chess.git
cd Chess
bundle installruby main.rbDuring the game, enter one of the following commands when prompted to choose a piece:
| Command | Action |
|---|---|
save |
Save the current game |
load |
Load a saved game |
quit |
Exit the game |
For regular moves, follow the prompts shown in the terminal.
Run the test suite with:
bundle exec rspecTo check the code style with RuboCop:
bundle exec rubocopThe following chess rules are still planned or under development:
- En passant
- Stalemate detection
- Improved input validation
- Additional gameplay polish
Contributions, suggestions, and bug reports are welcome. Feel free to open an issue or submit a pull request.