Zmiany

Skocz do: nawigacji, wyszukiwania

Module 3 - The “Cat in a Maze” Project

Dodane 580 bajtów, 09:30, 7 lip 2015
/* We programme and test the Cat in a Maze game */
3a. display Hurrah! in a speech bubble <br/>
3b. finish everything (the game is over). <br/>
 
 
 
– if the right arrow key has been pressed, rotate the sprite to the right (clockwise),
– if the left arrow key has been pressed, rotate the sprite to the left (counterclockwise),
– if the up arrow key has been pressed:
1. move the sprite by one square in the direction in which it is looking,
2. if the sprite has entered a red square:
2a. move the sprite back (reverse it) by one square,
2b. play the meow sound
3. if the sprite has entered a blue square:
3a. display Hurrah! in a speech bubble
3b. finish everything (the game is over).
568
edycji