Challenge 1 By Chris Brown Under the direction of Professor Susan Rodger Duke University January 2013 Based off of the Boat Racing Game by Jenna Hayes Boat Race In this world you must control a boat to travel through the 10 arches in the race course in order to win the game The faster you ID: 460018
Download Presentation The PPT/PDF document "Boat Racing Game" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Boat Racing GameChallenge #1
By Chris BrownUnder the direction of Professor Susan RodgerDuke University, January 2013Based off of the Boat Racing Game by Jenna HayesSlide2
Boat Race
In this world, you must control a boat to travel through the 10 arches in the race course in order to win the game. The faster your time, the better you will do! We want you to modify this game so that you will know the average time your boat travelled between each pair of arches when the race ends.Slide3
Average Time
We want to find the average time for each arch in this game.
Time
StartSlide4
Challenge
For this challenge in the boat race world, you will need to complete the “average” function to calculate the average time of the boat between a pair of arches that it had to travel through and modify the “win” method to display the average speed between pairs of arches to the user once they have completed the game. Slide5
world.average
You are given the total time that the game took and you need to calculate the average amount of time/arch.Hint: There are 10 total arches in the game.Slide6
world.win
Now, modify this method so that the text that once displayed the timer displays the average time of the boat. Add other methods and explore Alice to see what you want to add to this, such as having the boat explain (“say”) what the value that you computed represents.