Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following program on Processing: Three playing areas- These are represented by three vertical rectangles of different colours on the screen size of 600

Create the following program on Processing:

  1. Three playing areas- These are represented by three vertical rectangles of different colours on the screen size of 600 wide x 600 high.
  2. The shape of the gifts - In this assignment, we are using one shape for all three gifts. Player 1 gifts are filled with green colour, Player 2 gifts are filled with yellow colour and Player 3 gifts are filled with purple colour.
  3. Position of the gifts- Each player's gifts are placed at random locations within the player's playing area. You must use arrays to store the random locations of the gifts. (Hint- use one array per player ).
  4. Function to display the gifts - Your code must use a function that takes an array as an input/parameter (Hint: you pass the array which stores the random location of the gift from step 3 above). The function iterate through the input array to draw the gift/shapes on the respective players' playing area. No two gifts should overlap each other (Hint- validate the random locations of each gift to make sure they don't overlap each other).
  5. Function to create 'Dice and Roll' operation - Your code must use a function to build a dice and display a random number between 1-6 (inclusive of 6).
  6. Help Text - Help text is used at the top of the screen, which displays instructions on how to play a game like clicking the dice to start playing or display player names etc. In addition to the above help text, you must display the gift numbers of each respective player's gifts. In the sample video, we have used P1G1, P1G2, P1G3 as the text for three different gifts of Player 1 and P2G1, P2G2, P2G3 for gifts of Player 2 and same for Player 3.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Did you cite the sources of the statistics?

Answered: 1 week ago