A fully functional chess game that can be played with two players in the terminal.
Play online on Replit.
This demo shows a game that culminates in the fool's mate, which is the checkmate delivered after the fewest possible moves from the game's starting position.
- Game saving and loading
- Piece selection and move highlighting
- Declares checkmates and stalemates when present
- Prevents users from making illegal moves
- Handles special moves such as castling and en passant
- Allows users to propose and agree to draws
- Tested with RSpec
To play online, go here.
To play locally, you must have Ruby installed. This program was written in Ruby 3.1.
If you have Ruby installed, clone this repository:
$ git clone [email protected]:kathleenmoran/chess.git
Navigate to the top level folder and run ruby lib/main.rb
.
To run the tests you must have RSpec installed. These tests were written using RSpec 3.11.
Execute the tests by typing rspec
.
Written with the community Ruby style guide.
- Separate move logic in
Board
class into individual classes - Add option to play against the computer
- Allow users to play a game by uploading a text file containing FEN
- Enforce the fifty-move rule
- Add integration tests
This project is based off of an assignment from The Odin Project. Inspiration for the layout of this README was drawn from ChargrilledChook's READMEs.