Zmiany
* ''how a sprite will recognise that it has reached the finish line (crossed the line),''
** ''it can check after each movement (shift) by a randomly selected number of steps whether it has gone over the finishing position. If so, it has reached the finish line,''
* ''how a sprite will know that it is the first,''
''
We should consider where and how to use them. The clock should be cleared at the start of the race, and the measurement made during and at the end of each sprite’s sprint.''
Then we discuss how we could use them. How to record the time and how to display it on the screen.
''One method is storing time after each movement of each sprite until it reaches the finish line. Then we can display variables in which sprites store their times and we will have a live preview – just like in a televised race.Simultaneously, the last time stored in the variable is the time when a sprite has reached the finish line. The “clock” will stop automatically.We point out that we need to create a variable, e.g. called '''time''', separately for each sprite (available only for a particular sprite, and not all of them).''
We ask the students to make appropriate modifications to the programme and test it.We invite the first student who manages to achieve this to explain how he/she has done it and present his/her solution on the board. Then we ask if anyone had a different way of doing this and also discuss it with the whole group.
A sample programme modification may look like this:
[[Plik:A19.jpg|center]]
The '''third task''' is to add a drawing of the tracks on which the sprites move. We ask that before the start of the race one of the sprites draw the tracks on which the two sprites will be moving.
''The task is to remind the students the rules for using a pen and drawing planned figures by the sprite on the screen. In earlier tasks students already performed similar exercises, so they should not find implementing it difficult. We can only hint that the tracks should be simple and schematic – e.g. in the form of three lines delineating the boundaries of the tracks, and each sprite will be exactly in the middle between two of them, as shown below.''
[[Plik:A20.jpg|center]]
[[Plik:A23.png|center]]
''We point out that drawing the tracks consists in repeating specific actions three times, and allow the students to create the script themselves.
''
A sample modification of the scripts may look like this:
[[Plik:A22.jpg|center]]
It is worth pointing out that what has been added in this version is setting the '''time''' variables to 0for each sprite at the beginning of the programme for the clock to operate properly. If none of the students have noticed this error, we should help them to find it.
===Suggested additional tasks for self-completion by students===
# Adding a third competitor.
# Adding an audience that is active during the race.