This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: University of California San Diego ECE15: Engineering Computation Final Exam: Problem # 2 Wii Fit TM is a video game designed by Shigeru Miyamoto and developed by N INTENDO Ltd. It is an exercise game consisting of a number of activities utilizing the Wii Balance Board peripheral. One of these activities is a soccer-ball game, in which the objective is to hit soccer balls (with your head), while avoiding certain flying obstacles (such as a shoe or a panda-ball). You can see an online demo of this game at www.nintendo.com/wiifit/launch/?ref=#/training/demos/balance/1 . Briefly, a player in this game receives points for each soccer ball hit, and loses points for each obstacle hit. In this problem, you are required to write a C program that computes the scores of several players. More precisely, there are several possible events that contribute to a player’s score. We will use the let- ters H , M , O , P , and S to denote these events. Here is the corresponding table: Letter Event H hit a soccer ball M missed a soccer ball O avoided an obstacle P hit a panda-ball (obstacle) S hit a shoe (obstacle) Using the notation in this table, a player’s performance in the Wii soccer-ball game can be represented by a sequence of letters from the alphabet H , M , O , P , S . For example, if the player begins by hitting three soccer balls in a row, then is hit by a shoe, then avoids a flying obstacle, then misses a soccer ball, and finally is hit by a panda-ball, the sequence...
View Full Document
- Fall '08
- Input/output, Wii, C standard library, Shigeru Miyamoto, Wii Balance Board