Boat Racing Game Challenge #3 By Chris Brown Under the direction of Professor Susan Rodger Duke University, January 2013 Based off of the Boat Racing Game.

Slides:



Advertisements
Similar presentations
Visual Lists By Chris Brown under Prof. Susan Rodger Duke University July 2012.
Advertisements

As you come in… Sign in (in back) and pick up Badge Name Card – on computer… Log in: Launch/Start Alice Any questions? (of any kind) DOWNLOADS FOR TODAY:
Alice Programming Assessment: Parameters Samantha Huerta Under the direction of Professor Susan Rodger Duke University July 2014.
Using Functions in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University July 2008.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
SETTING UP CAMERA VIEWS LESSON Setting camera views using objects, based on a lesson by Bella. Adventures in Alice Susan Rodger Duke University July 2013.
Using Functions in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University July 2008.
Matlab tutorial course Exercises 4:. Exercises – for loops Download the scripts loops_example.m and if_else_example.m, run the code Download the function,
Run / Walk - Speed Lab Drexel STEM GK-12 Program David Rosen.
Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Rodger Duke University, July 2008.
Wizard Game: Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July
Calvin and Hobbes Teach Properties and Functions Created by Daniel MacDonald under the direction of Professor Susan Rodger Duke University June 2013.
Adding Automated Functionality to Office Applications.
1 Quiz Template: Click on the match By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Checking for Collisions Ellen Yuan Under the direction of Professor Susan Rodger at Duke University June 2014.
Calculator Challenge By: Chris Brown Under the direction of Professor Susan Rodger Duke University, January 2013.
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Iteration. Adding CDs to Vic Stack In many of the programs you write, you would like to have a CD on the stack before the program runs. To do this, you.
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Alice Pong Recreating Pong in Alice By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June 2010.
6.3 List Boxes and Loops Some Properties, Methods, and Events of List Boxes List Boxes Populated with Strings List Boxes Populated with Numbers Searching.
By Melissa Dalis Professor Susan Rodger Duke University June 2011 Multiplication Table.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Methods (a.k.a. Functions)
1.6 The Tortoise and the Hare
Making a Timer in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
Variables and Inheritance Part 1
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Simple Quiz Assessment David Yan Under the direction of Susan Rodger Duke University June 2015.
1 Quiz Template: Using the ‘ask user’ functions By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Nonvisual Arrays by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Boat Racing Game Challenge #2 By Chris Brown Under the direction of Professor Susan Rodger Duke University, January 2013 Based off of the Boat Racing Game.
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
Simple Collision Detection By David Yan Under the direction of Professor Susan Rodger and Chari Distler Duke University, June 2015.
Distance Challenge By: Chris Brown Under the direction of Prof. Susan Rodger Duke University, January 2013.
Random Numbers Random numbers are extremely useful: especially for games, and also for calculating experimental probabilities. Formula for generating random.
BDE Assessment Erin Taylor Under the direction of Susan Rodger Duke University June 2015.
Pie Graph Used to show how a whole unit is divided into simpler portions. Usually shown in percentages.
What is our new topic?. Speeding up Aim: To calculate speed. Key words: distance, time, speed, accurate.
An Introduction to Alice By Chris Brown under the direction of Professor Susan Rodger Duke University, March 2013.
Average Speed total distance total elapsed time v = d/t.
Boat Racing Game Challenge #4 By Chris Brown Under the direction of Professor Susan Rodger Duke University, January 2013 Based off of the Boat Racing Game.
CS320n –Visual Programming Execution Control with If / Else and Boolean Functions (Slides 6-2-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for.
Alice Programming Assessment: Random Number Variables Alex Boldt Under the direction of Professor Susan Rodger Duke University May 2015.
Functions. What is a Function?  We have already used a few functions. Can you give some examples?  Some functions take a comma-separated list of arguments.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
Looping Assessment Erin Taylor Under the direction of Susan Rodger Duke University June 2015.
1. Which variable is on the Y axis ? 2. Which variable is on the X axis? 3. Where was the object at 4 seconds? Graph 1.
CSC111 Quick Revision.
while Repetition Structure
Calculating Average Speed
Alice 3 Looping Assessment
Let's Race! Typing on the Home Row
Speed, Velocity and Acceleration
Piloting - Distance, Speed, Time
Memory Matching Challenge
Editable Attributes (1)
Boat Racing Game Challenge #1
Speed and Distance-Time Graphs
Restricting an Event with a Conditional
Computer Science 1 Online time for Graphics Program Random review
How can you make a guessing game?
WEEK 8 COURSE PROJECT PRESENTATION NAME: ALEXANDER WEISS CLASS: CIS115.
Speed.
under the direction of Professor Susan Rodger
Agenda Warmup Lesson 1.9 (random #s, Boolean variables, etc)
Alice Programming Assessment: Inheritance
Presentation transcript:

Boat Racing Game Challenge #3 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 your time, the better you will do! We want you to add to this game, so that in the end you will know the speed your boat travelled throughout the race.

Challenge In this challenge, you will need to complete the “average” function to calculate the speed of the boat over time in meters per second, and then modify the “win” method to display the speed to the user once they have completed the game.

world.average When you play the game, we’ve already written the code to complete the total time and collected the distances between each pair of arches in a list. You will need to fill in the average function to compute the speed. In this function, you are given the total time that the game took and a list of the distances in meters between each hoop as parameters.

world.average First you will need to sum up the values in the list to calculate the total distance*, then divide that by the time it took to complete the run through the arches. *Hint: Use a loop and create a new variable to find the sum of the values in a list! This means that your function will return a number!

world.win Now, modify this method so that at the end of the game, the text that once displayed the timer displays the speed (meters/second) the boat travelled throughout the game. Feel free to use other Alice methods to creatively show the data after the game has been won, for example, making the boat do a backflip!

world.win world.gameOn is just a variable that is true whenever the game is running and false when the game is over. To display a number as text, you will need to use the “what as a string” function under the string section of the Alice world functions.