Back to Math Projects

Shut the Box Project

This is our main web page with the 1-9 tile images, buttons, scores, and dice to play the game.

This page is to start our css file (cascading style scripts). All of our styling will be in this document.

This is our starter code for the javascript file where we will control all the button actions.

These are styles for centering and text decorations on our button.

These are new scripts for some of the actions we need to do when a tile is clicked. Additions to our stbScripts.js file.

These are new lines of code to add to the conditional and roll function. These additions are for our stbScripts.js file.

These are new lines of code to add a scoring function and a location to put the scores. These additions are for our all three of our files.

These are new lines of code to add a reset button to start the selection of tiles over again.

These are new lines of code to add a end game button that lists the score and switches to player 2.

These blocks will create a player total that sums up each round.

These blocks will create conditional for winning the round or scoring zero (shutting the box). I offer suggestions to conclude this project and make it ready to share on the web.

So I added two variations of scoring and a menu page to start the game. There is also neat css/jquery tricks like highlighting the player turn in my sample game. Now, on to the next game :)

David Johns and Electric Teaching ~ All Rights Reserved © 2015