Skip to content

reyes-dev/chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Chess

Traditional Chess, playable from the command line, written from scratch in Ruby.

Description

A Chess game you can play here. You can play against a simple-minded CPU that makes random moves or another human. It enforces the main rules of the game, including restricted piece movements and check/checkmate, and includes the essentials features such 6 types of pieces, castling, pawn promotion, en-passant, being multiplayer, a colored board and black/white team colors. I've used modularization to organize code into feature-specific files, classes to model individual pieces and concepts such as the board and gameplay loop, and YAML serialization to save and load games.

Features

  • Win by putting your enemy in checkmate
  • Move around the board and take enemy pieces
  • Play Human vs Human, or Human vs AI
  • Save and load your games from the main menu
  • Unicode graphics and color

Play online

Link to the live replit where you can easily play it from your browser. Just hit the green run button and wait a moment for the dependencies to install.

Run locally

Step-by-step instructions on how to run chess from your very own terminal! Note: You will need to have Ruby and Git installed.

  1. Install Ruby. If you need some help with this, here is a great resource for installing Ruby on MacOS and Linux
  2. Clone this repo, if you need help, GitHub has a great article on how to clone a repo.
  3. Navigate into this repo with cd chess
  4. Run bundle install to install Gemfile dependencies.
  5. Run ruby main.rb to launch the game.
  6. Play!

Known bugs

  • Replit occasionally changes how they render the terminal, making the board's visibility at risk at times

About

Command line Chess with the main rules of the game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages