Ejemplo n.º 1
0
        public void MineSeeding_NoMines_Test()
        {
            BoardSetUp board = Get10x10Board(BoardModes.BouncingWalls);

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

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

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

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

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

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

        DontDestroyOnLoad(gameObject);
        boardScript = GetComponent <BoardSetUp>();
        initGame();
    }
Ejemplo n.º 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> ();
    }
Ejemplo n.º 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> ();
    }
Ejemplo n.º 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));
 }
Ejemplo n.º 15
0
 void Awake()
 {
     playerRank = this.GetComponent <PlayerRank> ();
     troopCount = this.GetComponent <TroopCount> ();
     boardSetUp = this.GetComponent <BoardSetUp> ();
 }
Ejemplo n.º 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) });
 }
Ejemplo n.º 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) });
 }