Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 973 Bytes

debugging-1-guided.md

File metadata and controls

15 lines (8 loc) · 973 Bytes

Fix the snake!

In this task, you'll fix a problem with this simple web-based game:

Broken Snake Game

The way the game is supposed to work is that the snake moves up, down, left, and right (using the keyboard). Every time the snake eats a dot, it grows in length by one. If the snake collides with itself, the game is over.

As you'll see when you play the game, the snake does not move up, down, left, and right. It just seems to move diagonally, and when you press the arrow keys in certain directions, the game ends.

To find and fix this defect, you'll use this debugging strategy:

Open the debugging strategy in a new tab

Follow the strategy using the strategy execution tool to find and fix the following failure. You have up to 15 minutes. When you believe you've found the best fix, tell the experimenter which text on which line of code you changed (e.g., line 27, replace "hello" with "goodbye").