I need a lil help trying to figure out how to loop two players of a chip game.
Im new to c++ and I'm trying to understand this stuff the best I can and I hit a wall. Just need a lil push.
this is what I got current = player1;
while (totalChips>=0)
{
maxChips=totalChips/2;
if (totalChips%2==1)
{
maxChips+=1;
}
cout << endl << current << " how many of the remaining " << totalChips << " chip(s) would you like ("<<maxChips<< " max): ";
cin >> currentChips;
Alright I got it to work from going to player one to chose his chips, but once it goes to player 2 it gets stuck on player 2. How do I get it two alternate?