would like this code to just add one and then stop.

would like this code to just add one and then stop.

void won()
	{
		if (hasWon == true) 
		{
			if (player == 1) wins1 ++;
			else wins2 ++;
			msg =  "Play " + player + " WINS!";
			Debug.Log ("Player " + player + " Has Won.");
		}
	}

Thanks to any one how can help me

to make sure it only runs once you’ll have to make hasWon true like this:

void won()
{
   if(hasWon){
      //rest of code here
      //add this below
      hasWon = true;
  }
}

and then whenever you need to make sure you can win again just add wherever you want:

hasWon = false;