GithubHelp home page GithubHelp logo

chrisdews / beer-or-horse Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 527 KB

Is it a horse? is it a beer?! A quiz game by Chris Dews, Xander Johnston & Sam Barrie

Home Page: https://beer-or-horse.herokuapp.com/

License: Other

CSS 36.41% HTML 17.30% JavaScript 46.29%

beer-or-horse's Introduction

Beer or Horse? a quiz game where you guess whether the name presented is a beer or a horse. If you get one question wrong, the game ends.

User Story: - user signs up name & email (no password), - user logs in - user starts quiz - correct answers are logged and user moves on to next question. x second timer per question. - incorrect answer ends the game - score is logged on leaderboard, user has option to play again.

Stretch goals: - action cable - show current users playing and their submitted scores - beer and horse button / data - bring up facts about the pub or horse. - select x from y options to make the game more difficult - add music/sfx - faker to add a false option

Models:  - User has many Questions through Quiz, A Question has many Users through Quiz (join table - Quiz) - A Question has many Beers - A Question has many Horses

Logic thoughts - how to avoid the same names appearing when you restart - score++ after each correct answer - randomise questions so correct answer changes. - Stop users from cheating - 10 second timer?

Logic Story - user sign up/sign in (no password) - home page shows each User questions.count (number of questions attempted), Quiz.all.score sort by descending (leaderboard) - start game. - New Question is generated. - 10 second timer begins - Question fetches (for MVP) 1 name from either beers or horses. (later we could add multiple selections) - Question checks if name also exists in the data store not used. - Question listens for user click on beer/horse buttons. - if timer runs out, quiz ends. - If user selection matches category of name, Quiz.score++, generate new question. - If user selection does not match category of name, new Quiz option appears on screen. - Final score should post quiz to db. - re-render homepage, fetch-get all quiz scores.

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.