/rps-challenge

Create the Rock Paper Scissors Game

Primary LanguageRubyOtherNOASSERTION

Rock, Paper, Scissors Challenge Completed

Rock, Paper, Scissors Online Game which allows the player to put in their name, choose from three weapons and play against the computer. The game will declare a winner!

Screenshot

Screenshot

Screenshot

Key features:

  • Allows marketeer to input name
  • Marketeer is present the choices (rock, paper and scissors)
  • Marketeer can choose one option
  • Game will choose a random option
  • Computer chooses its weapon
  • A winner is declared

To install:

  1. git clone https://github.com/connie-reinholdsson/rps-challenge.git
  2. cd rps-challenge
  3. bundle
  4. rackup

Class Design Approach

Objects Initialize Messages
Player name
choice
choose_rock
choose_paper
choose_scissors
Computer choice
choose_rock
choose_paper
choose_scissors
random_number
computer_choice
Game player
computer_wins
player_wins
lets_play
confirmation

RPS Challenge

Instructions

  • Challenge time: rest of the day and weekend, until Monday 9am
  • Feel free to use google, your notes, books, etc. but work on your own
  • If you refer to the solution of another coach or student, please put a link to that in your README
  • If you have a partial solution, still check in a partial solution
  • You must submit a pull request to this repo with your code by 9am Monday morning

Task

Knowing how to build web applications is getting us almost there as web developers!

The Makers Academy Marketing Array ( MAMA ) have asked us to provide a game for them. Their daily grind is pretty tough and they need time to steam a little.

Your task is to provide a Rock, Paper, Scissors game for them so they can play on the web with the following user stories:

As a marketeer
So that I can see my name in lights
I would like to register my name before playing an online game

As a marketeer
So that I can enjoy myself away from the daily grind
I would like to be able to play rock/paper/scissors

Hints on functionality

  • the marketeer should be able to enter their name before the game
  • the marketeer will be presented the choices (rock, paper and scissors)
  • the marketeer can choose one option
  • the game will choose a random option
  • a winner will be declared

As usual please start by

  • Forking this repo
  • TEST driving development of your app

Bonus level 1: Multiplayer

Change the game so that two marketeers can play against each other ( yes there are two of them ).

Bonus level 2: Rock, Paper, Scissors, Spock, Lizard

Use the special rules ( you can find them here http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock )

Basic Rules

  • Rock beats Scissors
  • Scissors beats Paper
  • Paper beats Rock

In code review we'll be hoping to see:

  • All tests passing
  • High Test coverage (>95% is good)
  • The code is elegant: every class has a clear responsibility, methods are short etc.

Reviewers will potentially be using this code review rubric. Referring to this rubric in advance may make the challenge somewhat easier. You should be the judge of how much challenge you want this weekend.

Notes on test coverage

Please ensure you have the following AT THE TOP of your spec_helper.rb in order to have test coverage stats generated on your pull request:

require 'coveralls'
require 'simplecov'

SimpleCov.formatters = [
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
Coveralls.wear!

You can see your test coverage when you submit a pull request, and you can also get a summary locally by running:

$ coveralls report

This repo works with Coveralls to calculate test coverage statistics on each pull request.