Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
- What Happens Next? 1:29
- Build the mark() Method
- Build the checkForWin() Method
- get owner() Solution
- checkForWin() Method Challenge Solution
- Build the switchPlayers() Method
- Build the gameOver() Method
- Game Logic Methods Solution 1:56
- Build the updateGameState() Method
- Callback Function Solution
- updateGameState() Method Solution 2:16
- Reviewing 'Adding the Game Logic' 4 questions
Well done!
You have completed Object-Oriented JavaScript: Challenge!
Instruction
Build the checkForWin() Method
Assignment:
Write a getter method in the Space class called get owner() according to the requirements and guidelines below.
Attempt the challenge below OR include the provided solution to check for a winning move.
Discuss your solution in the Treehouse Community.
Requirements and Guidelines for Getter Method, owner()
This getter method helps cut down on the amount of code we need to writ...