Skip to content

mu2ku/Dominos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dominoes


Description:

  • This is a web browser-based game of dominoes versus a computer.

Getting Started:

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! :)

Screenshots:

  • Below is the initial wireframe for the dominoes game:
    Wireframe

  • Below is a screenshot of the game upon loading:
    Initial Game

  • Below is a screenshot of the game in play:
    Game in play

Pseudocode

  1. 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

  2. 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

  3. 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

  4. Handle a player clicking a domino

  5. Handle the domino moving to the board if numbers match

  6. Handle the computer's domino plays

Technologies Used:

  • JavaScript
  • HTML
  • CSS
  • Git

Next Steps:

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published