Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
- Connecting with the DOM
- Connecting with the DOM Solution 3:21
- Rendering Spaces
- Render the Board
- Render the Token
- Rendering the Spaces, Board, and Tokens Solution 5:11
- `Write Getter Methods for unusedTokens, activePlayer and activeToken
- Getter Methods Solution 2:44
- Build the startGame() Method
- startGame() Method Solution 2:53
- Reviewing Rendering the Game 5 questions
Well done!
You have completed Object-Oriented JavaScript: Challenge!
Instruction
Connecting with the DOM
Assignment:
Create a new file called app.js inside the js directory.
Inside app.js, initialize a new Game object.
Inside Game.js, add an empty method to the Game class called startGame(). Leave this method blank, we will fill it out in future steps.
Back inside app.js, add a click event listener for the HTML button element #begin-game (this button element is provided in the index.html file). ...