This program needs tobe in C++. I have barely gotten anywhere but am already stuck. Anyhelp with this one would be greatly appreciated.
Write a program thatsimulates playing a simplified version of the game \"Candy Land.\" In\"Candy Land\" players take turns drawing cards that have a coloredsquare on them. The player then travels on the board according tothe color on the card. The first person to reach the end of theboard wins.
In this version wewill practice using arrays and enums. We will use an array of intsto represent the players of the game. You should have an int arrayof size 4, then you will prompt the user for the number of playersfrom 2 - 4 and this will determine how much of the array you willuse. You will create an enum type CARD. The values of the enum willbe the possible color of the card. Value 0 should represent anempty deck, and you should have 6 colors (RED, PINK, ...).
To draw a card youwill read a number from cards.txt. Write a function that takes anifstream as an input parameter and returns a CARD. Read a numberfrom the file and convert the number to a variable of the CARDtype.
After prompting forthe number of players use a loop to draw cards for each player.After drawing a card, move the player by adding the card value tothe player total. The game will end either when the first playerreaches 20 or there are no more cards (input file reaches the end).The winner is the first player to have a score of 20 or more, orthe player with the most points after all the cards have beendrawn.
The program shouldoutput for each player's turn the current player, the card theydrew, how many spaces they move, and their location after moving(total score).