}; // List for possible mill position // Initiate function when game started void Awake() { // Constructions currentTurn = 'W'; tokenCounter = 0; phase = 1; operataion = "none"; PlayerTokenList = new ArrayList(9); AITokenList = new ArrayList(9); boardStatus = new char[spotList.Length]; tokenObjList = new GameObject[spotList.Length]; AI = AIBot.getInstance(); AI.SetGameControllerReferences(this); stateControl = GameObject.FindGameObjectWithTag("state").GetComponent <GameStateController>(); if (stateControl.GetCurrentEvent() == "Monster") { MonsterCombat.SetActive(true); } else if (stateControl.GetCurrentEvent() == "Boss") { BossCombat.SetActive(true); } for (int i = 0; i < spotList.Length; i++) { spotList[i].GetComponent <Spot>().SetGameControllerReferences(this); boardStatus[i] = 'N'; } StartGame(); }
// Placing Phase private void phaseOne() { currentToken = CreateToken(currentTurn); Guidence.text = "Place Your Token on Board"; GetAvailableSpot(); if (currentTurn == 'B') { bool difficult = (stateControl.GetCurrentEvent() == "Boss") ? true : false; AI.SelectPlacingSpot(boardStatus, phase, tokenCounter, currentTurn, difficult); } }