Question: C++ language Write a C+ program Hotwheels.cpp for a two-player game to be played on the computer. It is a hotwheels toy cars game being

Write a C+ program Hotwheels.cpp for a two-player game to be played on the computer. It is a hotwheels toy cars game being played between the user (player) and the computer. The players alternately pick up some toy cars from the pool; and the pool keeps reducing. The party to pick up last loses. - You should write a program to make it certain that the computer always wins all games. - When the game begins, the game informs that the total number of toy cars in the is 21 . - There is a collection of a total of 21 hotwheels toy cars in the pool as set by the player that the computer and the player would alternately pick and keep with them in their collection. - The program lets the player begin the game and asks the player to pick 1,2,3, or 4 toy cars from the pool. - The player indicates the number of cars to be picked up by entering a number. Please ensure that the user does not enter an invalid number. - After the player picks the number of toy cars that it wants, the game program indicates the number of remaining toy cars and prompts the computer to take its turn. - The computer takes its turn to pick 1,2,3, or 4 toy cars from the rest of the toy cars in the pool and the program indicates the computer's choice for the turn and the number of remaining toy cars. - The game alternates between the player and the computer choosing from the remaining cars till no more toy cars are left in the pool. - Write your program in such a way that the player has the lastturn and is forced to be the last one to pick up, and that the player picks up the last toy car to lose the game
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
