Skip to content

MattDawson2020/rps-challenge

 
 

Repository files navigation

Maker's Week 3: Weekend challenge

This challenge was the third of my Maker's weekend challenge, intended to be done alone to reinforce the week's learning and concepts. The necessary skills covered in this challenge were:

  • How to render a backend program so it is no longer REPL only
  • How to use MVC to update application as you run through its' functions
  • Move on from purely back-end focussed code

Successes

  • Successful usage of multiple stub types to fully test the possible outcomes of the game in both unit and feature testing
  • Codebase is concise and simple
  • Button and redirection based interface makes it extremely user friendly
  • Challenge was straightforward and easy, showing a strong understanding of the weeks lessons

To improve

  • It is preferred that the computer logic be written using symbols and only return outcomes, that the views handle the message presentation. No time to do it this challenge but an easy fix for the future
  • Styling, even without CSS it could be improved substantially with better HTML knowledge
  • Business logic could be simplied/ made more easily changeable in the future by using separate class or by using hashes to map winning/ losing pairs

RPS Challenge

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

Initialization

Requirements have all been listed in gemfile and spec_helper, all that should be required is to

  • Clone the repo to your machine
  • Run bundle install to ensure Sinatra and other dependencies are installed
  • Run < ruby app.rb > in the terminal to initialize the server
  • Go to < localhost:4567 > in your browser to run the game

Usage

  • Enter your name into the textbox on the homepage to set yourself as the player
  • Use the buttons embedded on the pages to take turns and have the computers moves generated for you
  • Use the play again button to redirect back to the play page

About

Create the Rock Paper Scissors Game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 88.1%
  • HTML 11.9%