Skip to content

troygamedev/bet-you-dont-know

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Bet You Don't Know

A realtime multiplayer game where players take turn answering trivia questions.
Website »

Table of Contents
  1. About The Project
  2. Getting Started
  3. License
  4. Contact
  5. Acknowledgements

About The Project

Players can create lobbies (private or public) and invite their friends to play via URL. The game involves 2 main stages: answering and betting. During the answering phase, a single player answers a trivia question. During the betting phase, all the other players will place bets hoping that the answerer got the trivia question wrong: the higher the bet, the more money they can steal from the answerer. Look below for rules and example.

Built With

Frontend:

Backend:

Host:

Rules

Rules

Players take turns answering trivia questions.

On your turn:

  1. Answer the trivia question displayed. (multiple choice)
  2. All other players can place bets hoping that you answered incorrectly.
  3. If their prediction was right (you got the question wrong), you will have to pay however much they betted on you.
  4. However, if you proved them wrong and answered correctly, you will earn $1000 AND everyone who didn't believe in you will have to pay their bets to you!

Example

Example

    It's Bob's turn to answer:

  1. Bob answers the question: What is 1+1? Bob bluffs that he can't do math.
  2. John believes that Bob is indeed bad at math and bets $500 that Bob will answer incorrectly.
  3. No way! Bob guessed correctly and won $1000. Additionally, because John made an incorrect prediction, $500 is deducted from his balance and given to Bob!

Getting Started

Here is a guide if you want to clone my website and modify it for yourself, all the way to deployment.

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/troygamedev/bet-you-dont-know.git
  2. Install packages
    yarn
    cd client
    yarn
    cd ../server
    yarn
  3. Create a .env file in the /server folder and fill in the following info for the backend to function properly
    SESSION_SECRET=
    ADMIN_PASSWORD=
    

Development

To run the development server

yarn dev

Then head over to localhost:3000

Deployment

  1. Publish the site on Heroku using continuous git integration.
  2. Enter in the environment variables (from .env) to Heroku via Heroku's CLI or through the website dashboard.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Ajay Liu - [email protected]

Project Link: https://github.com/troygamedev/bet-you-dont-know

Acknowledgements