hi,i am new to programming and i got an assignment which is very difficult,i hope anybody can help me here !!

``````You have to make a racing game in C++.
There are two players in your program. They play by throwing 3 dices and then moving forward.
Your program should start and ask you to press any key for a toss. After a fair toss, one of the players i.e. player 1 or player 2 starts the game. (use rand and srand function for fair toss)
Your screen must show a red perpendicular line on the right side of the screen i.e. finish line.
Player1*                       |
Player2 *                      |
User must be able to see two players standing at the left side of the screen. (* symbol shows each player).
At the start of the game the players are standing at start line.
The player who wins the toss starts the game and presses a key to throw 3 dices (use rand and srand). If the sum of all three dices is exactly equal to 10 then the player moves one step forward (towards right) and plays again (must use recursion for playing again). If next time again the sum is equal to 10 player moves forward and plays againâ€¦
If at any time the sum of three dices is not 10, player who was playing stops playing and other player starts playing and the whole procedure repeats (while or do while loop)until one of them has crossed finish line. After taking 30 steps, the player reaches finish line and on the 31st step the player crosses the finish line.
``````

seems legit

## All 3 Replies

seems legit

Can you use OpenGL?

hi,i am new to programming and i got an assignment which is very difficult,i hope anybody can help me here !!

Have you done your part? Have you tried solving this problem, and failed? Please, post your tries here 1st (code - what you have so far), and we'll try to help you from there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.