- This is a web browser-based game of dominoes versus a computer.
Click here to play game.
- Once the game has loaded, press "Start Game" to start the game
- Click on the domino tiles shown on the bottom of the browser to play them to the board
- Click on the "Draw Tile" button to draw additional tiles if you cannot play a tile to the board
- Refresh the page to restart the game and play again! :)
-
Define the required variables used to track the state of the game:
1.1) Variable to track turn (computer or player)
1.2) Variable to track win state (whether the game is ongoing, won, tied, or lost)
1.3) Variable to track whether a tile needs to be drawn -
Store cached element references:
2.1) Ability to draw a new tile if user can’t make move
2.2) Ability to select own domino -
Upon loading, the app should:
3.1) Include “Start Game” button, which calls an initialize function to initialize the state variables
3.2) Render those values to the page -
Handle a player clicking a domino
-
Handle the domino moving to the board if numbers match
-
Handle the computer's domino plays
- JavaScript
- HTML
- CSS
- Git
- Update the CSS to have the dominoes wrap around the board
- Calculate and keep track of the score for both the computer and player
- Use CSS animations to show tiles translating to board