Coder Social home page Coder Social logo

rps-challenge's Introduction

RPS Challenge

This is a bit of a mess! I was planning to come back to it, but then wasn't very well over the weekend, so instead have written in here where I got to and what I was aiming to do.

The biggest issue at the moment is there is only one rspec test! Which I know is not cool. I kept getting an error about rackup when I ran rspec and couldn't work out why, so moved on to just writing the code in the hope I'd fix it later on.

And then in terms of the code - I had just got to the point of writing out all the if/else statements for the rock, paper, scissors options - when I realised that would need to be moved into a seperate 'game' class, so my plan was to write something like a 'play' method in the game class, which would handle all the actual game code and return a true/false statement back to the app.rb which would then be used to decide the winner.

The other thing to mention is the only way I could think of someone selecting rock, paper or scissors would be to go to a different view for each choice, but then that seemed like you'd end up repeating a lot of code. So I was trying to work out if there is a way to identify which button someone had pressed but re-direct to the same page, but I couldn't work out how.

rps-challenge's People

Contributors

tansaku avatar neoeno avatar silvabox avatar jamesjoshuahill avatar sarahjonipower avatar michaelbjacobson avatar anitacanita avatar dearshrewdwit avatar ptolemybarnes avatar david-mears avatar edwardandress avatar mdsomerfield avatar sjmog avatar tatsiana-makers avatar

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.