Skip to content

stanams/chess_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chess

Ruby command line implementation of Chess.

Image of Chess

Game made to practice object-oriented principles and handling large projects. Implements classes for:

  • Board
  • Human Player / Computer Plater -- implements a simple AI to enable the user to play against a computer as this seems to be a trendy things these days...
  • Display
  • Game logic
  • Pieces -- uses inheritance to define generic pieces, and modules to DRY slidable pieces (bishop, rook, queen) and steppable pieces (knight, king).
  • Pawns are implemented separately due to their unique movement properties.

How to play?

To play chess in the terminal, follow these simple steps:

  • open your preferred terminal
  • git clone https://github.com/stanams/chess_game.git or download the repository
  • enter the chess folder (cd chess)
  • open irb or pry
  • load 'game.rb'
  • create a new game: g = Game.new
  • call g.play
  • the game is loaded and you can play!

About

A simple command line chess game with "naive" AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages