Zmiany

Skocz do: nawigacji, wyszukiwania

Module 3 - The “Cat in a Maze” Project

Usunięte 67 bajtów, 09:10, 7 lip 2015
/* Preparation: recognition of the background colour by the sprite */
We discuss how it can be used – what other block do we need? (Something is to happen if something else happens). We ask students to look through the blocks in the '''control''' group and together we discuss which one of them we can use. We hint them that its shape should fit the previously selected sensor block. We ask the students to drag over the block '''if''' and combine it with the previous one. <br/>
[[Plik:maze6.JPG|left]] <br/><br/><br/><br/>
Then we show the students how to select the colour in the '''is touching colour?''' block. For this purpose we click on the colour available on the sensor. The mouse pointer changes to an icon of a hand pointing an index finger. We click on the red colour in the stage area. The colour in the '''is touching colour?''' Block changes to match the colour of the stage. <br/>
''We reach the conclusion that it must move. We ask by how many steps. By as many as it moved forward previously. We wonder about which block we should use for movement – we have only one. But in it we can enter the number of steps which the sprite is to add (i.e. move forward). How to put down that now it is to go back? We reach the conclusion that we should subtract the number steps by which the character moved forward. That’s why we enter them with a minus.'' <br/>
[[Plik:maze7.JPG|left]] <br/><br/><br/><br/><br/>
'''We ask the following question:''' Where should we place these instructions? <br/>
Together with the students we think about where the instructions should be placed. We should come to the conclusion that the script '''when <up arrow> key is pressed''', which causes the movement of the character, needs to be modified because only when the character moves can it enter a forbidden colour. <br/>
'''Task:''' On the board, together with the students, we modify the script '''when <up arrow> key is pressed''', then each student introduces it in his/her game and tests it. <br/>
[[Plik:maze9.JPG]] <br/>
<br/><br/><br/>
'''We explain''' that we also want to add to the script a signal informing us of an attempt to enter the red colour. In such a case the cat sprite is to make a sound – meow. <br/>
'''Task:''' We ask the students to find the appropriate block and put it in the correct place within the script. <br/>
[[Plik:maze10.JPG|left]] <br/>
568
edycji