function winLose(total, random){
		if (total === random){
			wins = wins + 1;
			$("#winsSpan").text(wins);
			totalScore = 0;
			$("#totalScore").text(0);
			number = randomNumber();
			$("#numberToMatch").text(number);
			greenCrystal = randomGreen();
			$("#green").html(greenCrystal);
			purpleCrystal = randomGreen();
			$("#purple").html(purpleCrystal);
			yellowCrystal = randomGreen();
			$("#yellow").html(yellowCrystal);
			redCrystal = randomGreen();
			$("#red").html(redCrystal);

			
		};
		if (total > random){
			losses = losses + 1;
			$("#lossesSpan").text(losses);
			totalScore = 0;
			$("#totalScore").text(0);
			number = randomNumber();
			$("#numberToMatch").text(number);
			greenCrystal = randomGreen();
			$("#green").html(greenCrystal);
			purpleCrystal = randomGreen();
			$("#purple").html(purpleCrystal);
			yellowCrystal = randomGreen();
			$("#yellow").html(yellowCrystal);
			redCrystal = randomGreen();
			$("#red").html(redCrystal);
			
		};
	}
//Reset the value of the Crystals
Reset the value of the Crystals
Reset the value of the Crystals
function winLose(total, random){
		if (total === random){
			wins = wins + 1;
			$("#winsSpan").text(wins);
			totalScore = 0;
			$("#totalScore").text(0);
			number = randomNumber();
			$("#numberToMatch").text(number);
			greenCrystal = randomGreen();
			$("#green").html(greenCrystal);
			purpleCrystal = randomGreen();
			$("#purple").html(purpleCrystal);
			yellowCrystal = randomGreen();
			$("#yellow").html(yellowCrystal);
			redCrystal = randomGreen();
			$("#red").html(redCrystal);
		};
		if (total > random){
			losses = losses + 1;
			$("#lossesSpan").text(losses);
			totalScore = 0;
			$("#totalScore").text(0);
			number = randomNumber();
			$("#numberToMatch").text(number);
			greenCrystal = randomGreen();
			$("#green").html(greenCrystal);
			purpleCrystal = randomGreen();
			$("#purple").html(purpleCrystal);
			yellowCrystal = randomGreen();
			$("#yellow").html(yellowCrystal);
			redCrystal = randomGreen();
			$("#red").html(redCrystal);
		};
	}
function winLose ( total , random ) { if ( total === random ) { wins = wins + 1 ; $ ( "#winsSpan" ) . text ( wins ) ; totalScore = 0 ; $ ( "#totalScore" ) . text ( 0 ) ; number = randomNumber ( ) ; $ ( "#numberToMatch" ) . text ( number ) ; greenCrystal = randomGreen ( ) ; $ ( "#green" ) . html ( greenCrystal ) ; purpleCrystal = randomGreen ( ) ; $ ( "#purple" ) . html ( purpleCrystal ) ; yellowCrystal = randomGreen ( ) ; $ ( "#yellow" ) . html ( yellowCrystal ) ; redCrystal = randomGreen ( ) ; $ ( "#red" ) . html ( redCrystal ) ; } ; if ( total > random ) { losses = losses + 1 ; $ ( "#lossesSpan" ) . text ( losses ) ; totalScore = 0 ; $ ( "#totalScore" ) . text ( 0 ) ; number = randomNumber ( ) ; $ ( "#numberToMatch" ) . text ( number ) ; greenCrystal = randomGreen ( ) ; $ ( "#green" ) . html ( greenCrystal ) ; purpleCrystal = randomGreen ( ) ; $ ( "#purple" ) . html ( purpleCrystal ) ; yellowCrystal = randomGreen ( ) ; $ ( "#yellow" ) . html ( yellowCrystal ) ; redCrystal = randomGreen ( ) ; $ ( "#red" ) . html ( redCrystal ) ; } ; }
Reset the value of the Crystals
Reset the value of the Crystals