public void MineSeeding_NoMines_Test() { BoardSetUp board = Get10x10Board(BoardModes.BouncingWalls); board.ReseedMines(new Point[] { }); board.ReseedMines(new (int X, int Y)[] { });
void Awake() { scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); teamChecker = scriptHolder.GetComponent <TeamChecker> (); boardSetUp = this.GetComponent <BoardSetUp> (); troopRank = this.GetComponent <TroopRank> (); }
public void ValidateAgainstBordes_EarthMode_Test(int fromX, int fromY, int afterX, int afterY) { BoardSetUp board = Get10x10Board(BoardModes.EarthMode); Point calculatedPoint = board.ValidateAgainstBordes(new Point(fromX, fromY)); Assert.AreEqual(afterX, calculatedPoint.X); Assert.AreEqual(afterY, calculatedPoint.Y); }
void Awake() { territoryCount = this.GetComponent <TerritoryCount> (); soldierBonus = this.GetComponent <SoldierBonus> (); territories = GameObject.FindGameObjectWithTag("Territories"); boardSetUp = territories.GetComponent <BoardSetUp> (); }
void Awake() { scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); attack = scriptHolder.GetComponent <Attack> (); boardSetUp = this.GetComponent <BoardSetUp> (); territoryBonus = this.GetComponent <TerritoryBonus> (); territoryRank = this.GetComponent <TerritoryRank> (); }
void Awake() { playerTurn = this.GetComponent <PlayerTurn> (); setupPhase = this.GetComponent <SetupPhase> (); allocateSoldiers = this.GetComponent <AllocateSoldiers> (); territories = GameObject.Find("Territories"); boardSetUp = territories.GetComponent <BoardSetUp> (); }
void Awake() { territories = GameObject.FindGameObjectWithTag("Territories"); playerRank = territories.GetComponent <PlayerRank> (); boardSetUp = territories.GetComponent <BoardSetUp> (); scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); allocateSoldiers = scriptHolder.GetComponent <AllocateSoldiers> (); teamChecker = scriptHolder.GetComponent <TeamChecker> (); }
void Awake() { troopCount = this.GetComponent <TroopCount> (); territoryCount = this.GetComponent <TerritoryCount> (); territoryBonus = this.GetComponent <TerritoryBonus> (); continentBonus = this.GetComponent <ContinentBonus> (); soldierBonus = this.GetComponent <SoldierBonus> (); playerRank = this.GetComponent <PlayerRank> (); boardSetUp = this.GetComponent <BoardSetUp> (); }
// Use this for initialization void Start() { if (instance == null) instance = this; if (instance != this) Destroy(gameObject); DontDestroyOnLoad(gameObject); boardScript = GetComponent<BoardSetUp>(); initGame(); }
public void SettingBoard_PositiveDimensions_Test(int dX, int dY, int exitX, int exitY, BoardModes mode) { BoardSetUp probe = new BoardSetUp(new Point(dX, dY), new Point[] { new Point(exitX, exitY) }, mode); Assert.AreEqual(exitX, probe.Exit.X); Assert.AreEqual(exitY, probe.Exit.Y); Assert.AreEqual(dX, probe.BottomRight.X); Assert.AreEqual(dY, probe.BottomRight.Y); Assert.AreEqual(mode, probe.BoardMode); }
// Use this for initialization void Start() { if (instance == null) { instance = this; } if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); boardScript = GetComponent <BoardSetUp>(); initGame(); }
// Use this for initialization void Awake() { territories = GameObject.FindGameObjectWithTag("Territories"); troopCount = territories.GetComponent <TroopCount> (); boardSetUp = territories.GetComponent <BoardSetUp> (); changeCategory = territories.GetComponent <ChangeCatagory> (); GUI = GameObject.FindGameObjectWithTag("GUI"); openingDeployment = GUI.GetComponent <OpeningDeployment> (); displayEditor = GUI.GetComponent <DisplayEditor> (); buttonColour = GUI.GetComponent <ButtonColour> (); countryManagement = this.GetComponent <CountryManagement> (); playerTurn = this.GetComponent <PlayerTurn> (); teamChecker = this.GetComponent <TeamChecker> (); phases = this.GetComponent <Phases> (); globalFunctions = this.GetComponent <GlobalFunctions> (); }
// Set up array of player colours void Awake() { deploySoldiers = this.GetComponent <DeploySoldiers> (); phases = this.GetComponent <Phases> (); starterPhase = this.GetComponent <StarterPhase> (); setupPhase = this.GetComponent <SetupPhase> (); allocateSoldiers = this.GetComponent <AllocateSoldiers> (); territories = GameObject.FindGameObjectWithTag("Territories"); continentBonus = territories.GetComponent <ContinentBonus> (); changeCategory = territories.GetComponent <ChangeCatagory> (); boardSetUp = territories.GetComponent <BoardSetUp> (); GUI = GameObject.FindGameObjectWithTag("GUI"); lockoutPlayer = GUI.GetComponent <LockoutPlayer> (); displayTurn = GUI.GetComponent <DisplayTurn> (); gameInstructions = GUI.GetComponent <GameInstructions> (); }
public void ValidateAgainstBordes_DeadlyMoat_Outside_Test(int fromX, int fromY, int afterX, int afterY) { BoardSetUp board = Get10x10Board(BoardModes.DeadlyMoat); Point calculatedPoint = board.ValidateAgainstBordes(new Point(fromX, fromY)); }
void Awake() { playerRank = this.GetComponent <PlayerRank> (); troopCount = this.GetComponent <TroopCount> (); boardSetUp = this.GetComponent <BoardSetUp> (); }
public void SettingBoard_ExistOutside_Test(int dX, int dY, int exitX, int exitY) { BoardSetUp probe = new BoardSetUp(new Point(dX, dY), new Point[] { new Point(exitX, exitY) }); }
public void SettingBoard_Illegal_Dimensions_Test(int dX, int dY) { BoardSetUp probe = new BoardSetUp(new Point(dX, dY), new Point[] { new Point(0, 0) }); }