Zmiany

Skocz do: nawigacji, wyszukiwania
/* Suggested additional tasks to be self-completed by students */
At the beginning of the lesson we remind students what they were supposed to prepare between classes. We invite a volunteer to present his/her solution. We ask if anyone came up with a different solution. We discuss the solutions (we praise each correct solution).''
''If there was no homework, we start by repeating key issues from the previous module. We also ask if the students have any doubts about their own projects. We invite students to show anything they are proud of if they want to.''  
===Designing and writing a programme which automatically controls sprites – the Cat lurking and waiting for the Mouse===
'''We ask the following question:''' What can the Mouse trap look like, assuming that the Kitten will have a chance to catch the Mouse lurking near the trap, and the Mouse will have a chance to outsmart the Kitten?
''Most likely there will be a lot of ideas. We suggest that the trap should have two entrances. The Kitten will lurk only at one of them. If the Mouse chooses the other one, it will outsmart the Kitten – this way both characters will have a chance to win the game. Next, we consider what should be used to build the trap. We can suggest that the Kitten may set it, i.e. draw it. The Mouse will not be able to go through the walls drawn (built) by the Kitten. '' ''Then, together with the students we think about what the trap should look like. If necessary, we propose that it should be a square without one wall, placed with the missing wall close to the left edge of the stage. As a result, there will be two entrances at which we can place the Kitten. Students should already be able to draw the square. The cheese should be placed in the centre of the square. The trap may resemble the one shown below.''
[[Plik:B12.jpg|center]]
 
'''Task:''' We ask the students to create and test a script for the Kitten which will draw the trap after it is started. We remind them that we have already drawn a square in class.
* ''pointing the Kitten toward the right side of the stage to draw the trap walls,''
* ''thickening of the trap lines,''
* ''setting the Kitten toward the right side of the stage, so that it lurks waiting for the Mouse to come.''
''From the students’ designs we select one in which the majority of these elements have been implemented and show it as a model.
''When selecting the design to be shown we should also pay attention to how the square has been drawn – whether the block repeat <3> times has been used and whether when the drawing was finished the pen was raised, as any other solution may cause problems later.''''
'''Task:''' We ask the students to complete the Kitten script in accordance with the above guidelines.
** '''''It should somehow bypass the wall.'''''
''Together with the students we come to the conclusion that they are able to programme the first three events. If necessary, together we can select blocks useful for the task, but it is better that this part of the programme is completed by the students on their own. What does require discussion is the task of '''Bypassing the wall'''. We discuss with the students what the Mouse should do to be successful when it encounters a wall. We should come to the conclusion that if whenever it reaches wall it goes back as many steps as it came forward, then turns right (by 90 degrees to go parallel to the wall) and goes a few steps forward, it will always eventually bypass the wall and avoid meeting the Kitten.''
1. # A drawing determines the Kitten’s position at the trap (at the top or at the bottom of the trap). 2. # We add the support of L and P keys changing the direction in which the Mouse is to turn, and G and D keys controlling where the Kitten is to wait for the Mouse. 3. # We change the Kitten script so that it moves randomly up and down along the left edge of the screen.
197
edycji