Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
- Making the Game Interactive
- handleKeydown() Solution 1:51
- Build the moveLeft() and moveRight() Methods
- moveLeft() and moveRight() Methods Solution 5:18
- Build the drop() Method
- drop() Method Animation Challenge Solution
- drop() Method Solution 2:40
- Build the playToken() Method
- playToken() Method Solution 3:43
- Reviewing 'Making the Game Interactive' 5 questions
Well done!
You have completed Object-Oriented JavaScript: Challenge!
Instruction
Making the Game Interactive
Assignment:
Write a method called handleKeydown() in the Game class using the requirements and guidelines below.
Add a keydown event listener in app.js that calls the handleKeydown() method on the Game object in the callback function.
Keydown Events
Players in our Four in a Row game will use arrow keys to control the token. The left and right arrow keys will move the token side to side a...