/
Boat Racing Game Challenge Boat Racing Game Challenge

Boat Racing Game Challenge - PowerPoint Presentation

marina-yarberry
marina-yarberry . @marina-yarberry
Follow
373 views
Uploaded On 2018-03-20

Boat Racing Game Challenge - PPT Presentation

2 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 challenge you must drive the ID: 657919

boat distance arches game distance boat game arches average calculate challenge distances arch race world win finish modify add

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Boat Racing Game Challenge" 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.


Presentation Transcript

Slide1

Boat Racing GameChallenge #2

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 challenge, you must drive the boat to travel through 10 arches in a race course in order to win the game. The faster your time, the better you will do! To make things more difficult, the arches are placed in a random position each time you run this game, so no two courses will be alike. We

want

you to

add to this game, so that in the end you will know the average distance between arches.Slide3

Challenge

For this version of the boat race world challenge, you will need to complete the “average” function to calculate the average distance that the boat travels to go through each hoop in the game, and then modify the “win” method to display the average speed to the user once they have completed the game. The program is already set up to collect the distances between each arch, you will use those to calculate the total distance between each of the arches that you must pass through.Slide4

Average Distance

We want to calculate the average distance between pairs of arches. The code provides a list of this information called distances for you to use

to calculate the final average.

distance

distance

distance

distance

distance

distance

distance

distance

distance

Start

FinishSlide5

world.average

You are given a list of the distances between pairs of arches and you will need to calculate the average distance between two arches (meters/arch) it took the boat to finish the game.Hint: There are 10 total arches in the game and the boat starts a short distance before the first arch.Slide6

world.win

Now, modify this method so that the text that once displayed the timer displays the average distance the boat travelled between arches. Once again, feel free to explore Alice and add other aspects to the winning screen of the game. For example, have a fish come up out of the water to congratulate you on your victory!