Skip to content
sufiancodesPublic

About

This a command line Chess game where two players can play against each other

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

186 Commits

Folders and files

Repository files navigation

♟️ 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.

About

This a command line Chess game where two players can play against each other

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages