Zmiany

Skocz do: nawigacji, wyszukiwania

Module 3 - The “Cat in a Maze” Project

Dodane 21 bajtów, 09:36, 7 lip 2015
/* We programme and test the Cat in a Maze game */
We explain to the students that we have already completed a large part of the work needed to create the Cat in a Maze game. We remind them the arrangements made at the beginning of the classes by displaying the algorithm created based on them. For example: <br/>
:''if the right arrow key has been pressed, rotate the sprite to the right (clockwise),'' <br/>:''if the left arrow key has been pressed, rotate the sprite to the left (counterclockwise),'' <br/>:''if the up arrow key has been pressed:'' <br/>::''1. move the sprite by one square in the direction in which it is looking'',<br/>::''2. if the sprite has entered a red square:''<br/> :::''2a. move the sprite back (reverse it) by one square,''<br/> :::''2b. play the meow sound''<br/>::''3. if the sprite has entered a blue square:''<br/>:::''3a. display Hurrah! in a speech bubble''<br/>:::''3b. finish everything (the game is over).''<br/>
568
edycji