This project is a two-player game of chess played in the terminal. This game was written in Ruby following the principles of object-oriented design and thorough testing.
Features of this chess game include the following:
- your current game can be saved, and you can load a previously saved game using JSON;
- the game does not allow illegal moves, including those would leave or place the king in check; and
- the board shown in the console rotates for each player.
This project is part of the The Odin Project curriculum.
- Fork this repository on GitHub.
- Clone your forked reposity onto your local computer.
- To play the game,
cd
into the project folder and typeruby play.rb
.
- Fork this repository on GitHub.
- Clone your forked reposity onto your local computer.
- To run the tests, you need to have
rspec
installed.- First, check to see if
rspec
is already installed by typingrspec --version
into the command line. - If the response is similar to the following, then you already have
rspec
installed and can continue.RSpec 3.8 - rspec-core 3.8.0 - rspec-expectations 3.8.2 - rspec-mocks 3.8.0 - rspec-support 3.8.0
- If you do not see output similar to the above, then you need to install
rspec
by typinggem install rspec
into the command line. - Now, run
rspec --version
again to ensure that it installed correctly.
- First, check to see if
- Use
cd
to move into the main directory and then enterrspec
to run the tests.
- Ruby 2.5.3
- RSpec 3.8