Zmiany

Skocz do: nawigacji, wyszukiwania

Module 3 - The “Cat in a Maze” Project

Dodane 591 bajtów, 08:21, 7 lip 2015
/* Designing a game involving going through a maze */
''After discussing which key should make the character move by one square, we write on the board what we have agreed on, for example:''<br/>
'''* ''When the up arrow key is pressed, go forward by “one square.''”'''
 
'''Question:''' How should the computer react if the character collides with a maze wall? <br/>
''There will be various answers, such as: the character dies, the game starts from the beginning, etc. We hint that if we do not want the game to end too quickly, it will be enough for the character to bounce off the wall and return to its previous place. Additionally, it can emit a sound, e.g. meow.'' <br/>
 
''We add the following to the previous record, e.g.''
* '''''If the character collides with a wall, go back to where it was previously located, and then:
* Play a meow sound.'''''
568
edycji