예제 #1
0
        public void MineSeeding_NoMines_Test()
        {
            BoardSetUp board = Get10x10Board(BoardModes.BouncingWalls);

            board.ReseedMines(new Point[] { });

            board.ReseedMines(new (int X, int Y)[] { });
예제 #2
0
 void Awake()
 {
     scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder");
     teamChecker  = scriptHolder.GetComponent <TeamChecker> ();
     boardSetUp   = this.GetComponent <BoardSetUp> ();
     troopRank    = this.GetComponent <TroopRank> ();
 }
예제 #3
0
        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);
        }
예제 #4
0
    void Awake()
    {
        territoryCount = this.GetComponent <TerritoryCount> ();
        soldierBonus   = this.GetComponent <SoldierBonus> ();

        territories = GameObject.FindGameObjectWithTag("Territories");
        boardSetUp  = territories.GetComponent <BoardSetUp> ();
    }
예제 #5
0
    void Awake()
    {
        scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder");
        attack       = scriptHolder.GetComponent <Attack> ();

        boardSetUp     = this.GetComponent <BoardSetUp> ();
        territoryBonus = this.GetComponent <TerritoryBonus> ();
        territoryRank  = this.GetComponent <TerritoryRank> ();
    }
예제 #6
0
    void Awake()
    {
        playerTurn       = this.GetComponent <PlayerTurn> ();
        setupPhase       = this.GetComponent <SetupPhase> ();
        allocateSoldiers = this.GetComponent <AllocateSoldiers> ();

        territories = GameObject.Find("Territories");
        boardSetUp  = territories.GetComponent <BoardSetUp> ();
    }
예제 #7
0
    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> ();
    }
예제 #8
0
 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> ();
 }
예제 #9
0
    // Use this for initialization
    void Start()
    {
        if (instance == null)
            instance = this;
        if (instance != this)
            Destroy(gameObject);

        DontDestroyOnLoad(gameObject);
        boardScript = GetComponent<BoardSetUp>();
        initGame();
    }
예제 #10
0
        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);
        }
예제 #11
0
    // Use this for initialization
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
        boardScript = GetComponent <BoardSetUp>();
        initGame();
    }
예제 #12
0
    // 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> ();
    }
예제 #13
0
    // 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> ();
    }
예제 #14
0
 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));
 }
예제 #15
0
 void Awake()
 {
     playerRank = this.GetComponent <PlayerRank> ();
     troopCount = this.GetComponent <TroopCount> ();
     boardSetUp = this.GetComponent <BoardSetUp> ();
 }
예제 #16
0
 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) });
 }
예제 #17
0
 public void SettingBoard_Illegal_Dimensions_Test(int dX, int dY)
 {
     BoardSetUp probe = new BoardSetUp(new Point(dX, dY), new Point[] { new Point(0, 0) });
 }