Giter VIP home page Giter VIP logo

shutthebox's Introduction

Shut The Box

Imgur

https://markleds.github.io/ShutTheBox/

Shut The Box is a one or two player web app game inspired by a dice game I played as a child at my grandmother's house. The app was built using HTML, CSS, JavaScript and jQuery. The object of the game is to clear all of the numbers from the red number line.


Object of the game

Single Player: To cover all of the numbers on the board with the fewest rolls of the dice.

Two Players: To cover all of your numbers on the board before your opponent covers theirs.


Technologies Used

This game was created as a single page web app using HTML, CSS, JavaScript and jQuery. Linked files include:


How To Play The game

The object of the game is to clear all of the numbers 1 - 10 from the red number line.

Single Player Game

  1. Start the game by rolling the dice.
  2. Select a number or multiple numbers from the red number line that add up to the sum of the dots on the displayed dice.
  3. Roll again and repeat until the number line is clear.
  4. If you are unable to match the remaining numbers in the red number line to the dice, continue rolling until you have a playable match.

Two Player Game

  1. The dice are rolled to start the game and the top player on the board goes first.
  2. In turn, each player selects a number or multiple numbers from their red number line that add up to the sum of the dots on the displayed dice.
  3. To complete the turn, click the "Play Selected Numbers" button.
  4. If a player is unable to match any of the remaining numbers in their red number line to the sum of the dots on the displayed dice, that player ends their turn by clicking the "Play Selected Numbers" button.
  5. The game ends when one player has cleared all of the numbers from their number line.

Acknowledgments

Bobby King for help with the timer JS code - an in-class lab

Stack Overflow for help with dice animation

shutthebox's People

Contributors

markleds avatar mgershowitz avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kevinzhongny

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.