
-----------------------------------
a22asin
Mon Sep 15, 2014 6:54 pm

Dice Game Help Please!
-----------------------------------
Hi, so i finally started learning c++ in my 2nd year uni. I got my first assigment where i have to create a dice game for 2 players or a player and a bot where each player takes turn rolling the dice. The game continues till one user reaches a score of 100 or more. If the player roles a 1, the player doesnt get any points. Furthermore, when one player finally reaches 100 or more, the other player gets one last time to role and try to catch up.

My program works for the most part, but my problem is that when the player chooses to play against a bot, the program seems to skip the ask user to continue and just keeps playing the game till a winner occurs. The part the program seems to skip is separated

[code]

/*
Press Your Luck is a dice game where the players take turn rolling the die till one of the player reaches 100 points.  
*/

#include 
#include 
#include 

using namespace std;

int main()
{
	
	int score1=0;
	int score2=0;
	int tempscore=0;
	int dice=0;
	int whoTurn =1;
	char cont = 'y';
	char player;
	bool lastTry = false;
	bool lastGame = false;
	srand(time(NULL));
	
	cout > player;
	
	do {
		//Runs through the current player's turn
		while (cont == 'y'){
			cout 