Question: Implement the following marble game using Circular Linked List. a. Marble has a color and value i. Colors: Red, Green, Yellow and Blue ii. Values

Implement the following marble game using Circular Linked List. a. Marble has a color and value i. Colors: Red, Green, Yellow and Blue ii. Values for the colors are as follows: 1. Red-1 2. Green-2 3. Yellow -3 4. Blue 4 b. You have been given a box of marbles which is having 20 marbles in each color. You have to choose one marble randomly and put that in a ring. When there is 4 of the same color continuously in the ring the marbles will be "gone" and the value will be calculated (refer figures below) Insert marble# 3 Insert marble# 2 Insert marble# 3 Insert marble# 3 Insert marble# 3 Total Points earned-3 +3+3+3-12 Insert marble# 1 Calculate the total points that you have earned after 20 times you have inserted the marbles in a ring
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
