Skip to content
/ chess Public

A way for two players to play chess inside a Ruby console.

Notifications You must be signed in to change notification settings

zelaznik/chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Chess

Screenshot of Checkmate

Summary

  • At each step the player can use the keyboard to select a piece to move, and then uses a cursor to walk toward the place where he’d like to move the piece.

  • When the cursor hovers over a particular piece, all the available moves for that piece are highlighted in blue.

  • If a move is invalid, the board will not let you move the piece. This includes but is not limited to: trying to move a piece off the board. Trying to move into check. Not moving out of check. Trying to move a piece over another one.

  • When a person is in check, a notification will display on the console, same things happens when a person is in checkmate

Setup Instructions

  • If you don't have Ruby 2.0 or later, install it.
  • Browse to the directory you want in the terminal.
  • Clone the Git Repo in your computer.
  • Make sure to have the colorize gem.
$ sudo install ruby
$ cd desktop
$ git clone https://github.com/zelaznik/chess.git  
$ gem install colorize

Playing Instructions

Starting The Game

  • Browse to the directory and start the game
$ cd chess
$ ruby game.rb

Making A Move

  • The yellow squares are the squares that are active on the cursor. To move around the board use the following four keys like arrows: [mac_keyboard]: https://raw.githubusercontent.com/zelaznik/chess/master/images/mac_keyboard.jpg
  • ![Mac Keyboard][mac_keyboard]
  • "W" for up, "A" for left, "S" for down, "D" for right
  • Hit "return" to pick a piece to move.
  • Hit "return" again once you've navigated to the spot where you want to move.

About

A way for two players to play chess inside a Ruby console.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages