// Update is called once per frame void Update() { if ((currentState.BlackWin || currentState.BlackScore >= 10) && PopUpWinPanel.activeSelf == false && !LockPopUp) { PopUpWinPanel.SetActive(true); Text WinText = GameObject.Find("WinText").GetComponent <Text>(); WinText.text = "Black has won"; } if ((currentState.WhiteWin || currentState.WhiteScore >= 10) && PopUpWinPanel.activeSelf == false && !LockPopUp) { PopUpWinPanel.SetActive(true); Text WinText = GameObject.Find("WinText").GetComponent <Text>(); WinText.text = "White has won"; } if (IATurn == true) { IATurn = false; IA.ComputerPlay(); } }