i'm new to c++, but am taking a intro to computer science class. we have to write a 2 player game. Game Rules: There are three stacks (A, B and C) of sticks on the table. Each stack is initialized with a random number of sticks between 3 and 10 (inclusive). Each player takes turns choosing a stack and taking a number of sticks form that stack. A player may take either ONE stick or TWO sticks from that (selected) stack. After a player has removed a number of sticks from a stack, play is then passed to the other player. The game continues as long as there are sticks in any one of the stacks.
I dont know where to start. is there someone who could steer me in the right direction on how to start? any help would be greatly appreciated. it's for a console btw.
Jump to Post
You need 3 stacks, so therefore why not have 3 variables to mimic these stacks.
Each variable needs to contain a random number between 3 and 10. There are many examples of how to generate random numbers. Use these examples.
Think of a way to check which players …
All 2 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.