Skip to content

Latest commit

 

History

History
90 lines (57 loc) · 1.92 KB

README.md

File metadata and controls

90 lines (57 loc) · 1.92 KB

♟️ Chess CLI

A classic two-player chess game built in Ruby and played directly in your terminal.

✨ Overview

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.

📸 Preview

Chess CLI game preview

🎯 Features

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

🛠️ Built With

🚀 Getting Started

Prerequisites

Make sure Ruby and Bundler are installed on your machine.

Installation

Clone the repository and install the project dependencies:

git clone https://github.com/sufiancodes/Chess.git
cd Chess
bundle install

Run the game

ruby main.rb

🎮 Commands

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

🧪 Running Tests

Run the test suite with:

bundle exec rspec

To check the code style with RuboCop:

bundle exec rubocop

🗺️ Roadmap

The following chess rules are still planned or under development:

  • En passant
  • Stalemate detection
  • Improved input validation
  • Additional gameplay polish

🤝 Contributing

Contributions, suggestions, and bug reports are welcome. Feel free to open an issue or submit a pull request.