Giter VIP home page Giter VIP logo

chess_ruby's Introduction

Chess Ruby

Ruby Chess simple command line chess application.  Two human players will be able to play a game of chess via command line input and see the board via command line output

Installation

Clone the repo and run bundle install in terminal:

$ bundle install

Usage

To start a new game run the following prompt in the chess_ruby directory:

$ ruby bin/run.rb

The following board should display in console

Image of Board

Each player should take turns entering a move in the format of "A2 A5" where the first coordinate is the current location of the piece and the second is the target location.  The game will move the piece and rerender the board if the player enters a valid move.  

The game will run until there is a checkmate; to exit prematurely, press Control + C

Contributing

To contribute, fork the repo and make a pull request.

Some features currently missing/defective:

  • Turn/Game Logic - the application does not enforce alternating turns between black and white pieces.  It relies on the users to move the correct color during their turns
  • Pawn Promotion - there is currently no method to promote pawns when they reach the opposide end of the board
  • Checkmate -  currently the checkmate method only tests if there is a valid move the king can make to escape a check situation.  It does not check if the player can move another piece to break check

License

This repo is available under a MIT license

chess_ruby's People

Contributors

bh792 avatar

Watchers

James Cloos avatar

chess_ruby's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.