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.
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.
This game was created as a single page web app using HTML, CSS, JavaScript and jQuery. Linked files include:
- jQuery library
- Google Fonts: Righteous, Changa One
The object of the game is to clear all of the numbers 1 - 10 from the red number line.
Single Player Game
- Start the game by rolling the dice.
- Select a number or multiple numbers from the red number line that add up to the sum of the dots on the displayed dice.
- Roll again and repeat until the number line is clear.
- 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
- The dice are rolled to start the game and the top player on the board goes first.
- 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.
- To complete the turn, click the "Play Selected Numbers" button.
- 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.
- The game ends when one player has cleared all of the numbers from their number line.
Bobby King for help with the timer JS code - an in-class lab
Stack Overflow for help with dice animation