8000 GitHub - sco-bo/chess
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sco-bo/chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Chess! The classic game of strategy and deft maneuvers. Improve your skills with this chess engine which can be played on your computer's command line at any time. Just fire up your Terminal and start playing. Alt text

##Built based on OO principles This game was built in Ruby with OO (Object Oriented) principles in mind.

  • Pieces were built as "dumb" as possible. They ensure separation of concerns by leaving the state of the board to the Board.

  • Board is made up of Square objects which have Pieces on them (or not). The Board has a general idea of what moves are available/allowed and what moves are not, based on the state of the board. It also keeps a History of past moves.

  • Player knows about his/her own pieces and he/she is the one to know what a piece can and cannot do.

  • Game controls the flow of the game (whose turn it is, what move that player wants to make, whether or not that move is a valid choice, etc.) Game also checks for and responds appropriately to all possible chess scenarios:

Alt text

##Saving and Loading Games A game can be saved using YAML and saved games can be loaded from the YAML file. Alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0