Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 spec
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README.md

Mastermind

The game of mastermind in Rails This is a test project to familiarize myself with RSpec and Cucumber The whole game is completely unit and functionally tested The specs and features can be found under /spec and /features accordingly

Rules

  • To play the game, you will have to register and log in
  • To start a game, you will need to click "Play" from your dashboard
  • Computer will guess four pegs of two distinct colors (0101)
  • You will be presented with a set of select boxes - one box for each peg
  • Each select box will contain two numbers, representing colors (0 and 1)
  • You will guess a combination of pegs you believe to match computer's
  • After clicking "Submit", you will be shown the number of pegs you managed to guess
  • When you guessed all pegs, the game is over and you won
  • After 8 unsuccessful attempts, the game is over and you lost

Installation

  • Clone the repository
  • In the repository root, run bundle install
  • Create the database by running rake db:migrate

Running tests

  • Run rake spec to run specs
  • Run 'rake cucumber` to run features

Starting the game

  • Run rails server
  • Go to localhost:3000 and follow game's instructions
Something went wrong with that request. Please try again.