The goal of the game is simple: be the player to pick up the last chip. The game starts out by asking the user how many chips should be in the initial pile. The number of chips in the pile can range from two to fifty, inclusive. Next, player one is prompted to pick up chips. The allowed number of chips to pick up is one to half of the current pile, inclusive. The program then responds with how many chips are in the pile and a prompt to player2 to take their turn of chips. This goes on until there is one player to pick up the last remaining chip. This player is declared as the winner and the program ends.
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
audreyclark/ChipsGame
About
Play a game of chips using C++ code
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published