[Solved] COMP9032 Project

$25

File Name: COMP9032_Project.zip
File Size: 150.72 KB

SKU: [Solved] COMP9032 Project Category: Tag:
5/5 - (1 vote)

Description:

Cup and Ball [1] is an online game where a ball is shuffled under three cups and you guess the position of the ball. For each guess, you gain one point if it is correct or lose one point if it is wrong. (Click the picture in Figure 1 for a fun try on this game.)

Figure 1

In this project, you will be working individually to develop a system, using the AVR Lab board, to simulate the game (with some modifications).

In this system, the push button is used to start the game; Three LEDs are used to represent the three cups, and these LEDs together with the motor are also used to indicate the ball shuffling among the three cups; the key board (replacing the mouse in the original game) is used for the player to make a guess; the players score is displayed on LCD, as indicated in Figure 1.

For the LED bar on the lab board, two groups of LEDs are used, as shown in Figure 2. Three LEDs, called cup LEDs, are associated with three cups (as mentioned before) and the four LEDs of the other group work as a result indicator for a guess. When a guess is correct, the indicator will flash.

LED Bar

Result Indicator

Figure 2

Each operation of the system and the related inputs/outputs are described below.

  1. After the simulation system is turned on (i.e. the lab board is powered on), the system is initialized and the ball is with an arbitrarily cup. In this case,
  2. Ready is displayed on LCD;
  3. The cup LED with the ball is on, as illustrated in Figure 3 (a), where the ball is with Cup 3. Other LEDs are off.

Figure 3 (a)

  1. When the push button is pressed, the game starts and the ball is shuffled under the three cups. In this case,
  2. Start is displayed on LCD;
  3. Motor spins;
  4. Three cup LEDs are all on, but in dimmed light; other LEDs remain off, as shown in Figure (b).

Figure 3 (b)

  1. When the player wants to make a guess for the ball position by pressing the push button again, the ball shuffle stops. In this case,
  2. The motor stops;
  3. The three cup LEDs remain dimmed, as shown in Figure (3)(b);
  4. After the player keys in the ball position on the key pad, the cups are removed, the ball position is uncovered and the score is determined. In this case,
  5. The cup LED with the ball is fully on, as illustrated in Figure 3

(c), where the ball is now with Cup 2; ii. If the players guess is correct, the score on the LCD is incremented by 1 and the indicator will flash a few times, as illustrated in Figure 3 (c)(i); otherwise,

iii. If the guess is incorrect, as illustrated in Figure 3 (c)(ii), the score on LCD is decremented.

Figure 3 (c)

  1. When the players score becomes zero, the game will be reset to the initial start status; otherwise, the game can be continued by pressing the button for a new round of ball shuffle.

In your design, you need to decide how to shuffle the ball. You can add extra functions to make your design better (which is optional) and you are also allowed to make assumptions that you think are necessary but not given in this project specification.

Reference

[1] https://www.megafungames.com/games/cup_game/

Submission Information:

The following items should be submitted:

  1. Source code. Your program should be well commented.
  2. User manual (up to 3 pages). The user manual describes how to use your simulation system, including how to wire up the AVR lab board.
  3. Design manual (up to 5 pages). The design manual describes how you design the simulation system.

Both manuals should be written well. A person with knowledge about the course and the lab board should understand how your system is designed and how to use your system after reading the given manuals.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] COMP9032 Project
$25