// Try means its safe to use every turn, and will only run when appropriate public void AITryAITurn() { if (playerDirectory[ActivePlayer] != PlayerType.AI) { return; } List <Outcome> moves = computerPlayer.GenerateTurn(ActivePlayer); // Here the ai executes its moves as it goes for ease of simulation selectionManager.EndTurn(); selectionManager.ImplementAITurn(moves); }
public void TurnButtonClicked() { if (inputEnabled.TurnEnd) { selectionManager.EndTurn(); } UnityEngine.EventSystems.EventSystem.current.SetSelectedGameObject(null);//Prevents button from remaining highlighted after use }