示例#1
0
        public void StartNewTurn()
        {
            // start timer
            turnStart = DateTime.Now;

            foreach (var coord in coords)
            {
                ClearDynamic(ref map[coord.x, coord.y]);
            }


            MyHills.Clear();
            MyAnts.Clear();
            EnemyHills.Clear();
            EnemyAnts.Clear();
            DeadTiles.Clear();
            FoodTiles.Clear();
        }
示例#2
0
        public void StartNewTurn()
        {
            // start timer
            turnStart = DateTime.Now;

            // clear ant data
            foreach (Location loc in MyAnts)
            {
                map[loc.Row, loc.Col] = Tile.Land;
            }
            foreach (Location loc in MyHills)
            {
                map[loc.Row, loc.Col] = Tile.Land;
            }
            foreach (Location loc in EnemyAnts)
            {
                map[loc.Row, loc.Col] = Tile.Land;
            }
            foreach (Location loc in EnemyHills)
            {
                map[loc.Row, loc.Col] = Tile.Land;
            }
            foreach (Location loc in DeadTiles)
            {
                map[loc.Row, loc.Col] = Tile.Land;
            }

            MyHills.Clear();
            MyAnts.Clear();
            EnemyHills.Clear();
            EnemyAnts.Clear();
            DeadTiles.Clear();

            // set all known food to unseen
            foreach (Location loc in FoodTiles)
            {
                map[loc.Row, loc.Col] = Tile.Land;
            }
            FoodTiles.Clear();
            OccupiedNextRound.Init(false);
        }
示例#3
0
        public void StartNewTurn()
        {
            // start timer
            turnStart = DateTime.Now;

            // clear ant data
            foreach (Location loc in MyAnts)
            {
                Map[loc.RowY, loc.ColX] = Tile.Land;
            }
            foreach (Location loc in MyHills)
            {
                Map[loc.RowY, loc.ColX] = Tile.Land;
            }
            foreach (Location loc in EnemyAnts)
            {
                Map[loc.RowY, loc.ColX] = Tile.Land;
            }
            //foreach (Location loc in EnemyHills) Map[loc.RowY, loc.ColX] = Tile.Land;
            foreach (Location loc in DeadTiles)
            {
                Map[loc.RowY, loc.ColX] = Tile.Land;
                EnemyHills.RemoveWhere(x => x.EqualTo(loc));
            }

            MyHills.Clear();
            MyAnts.Clear();
            //EnemyHills.Clear();
            EnemyAnts.Clear();
            DeadTiles.Clear();

            // set all known food to unseen
            foreach (Location loc in FoodTiles)
            {
                Map[loc.RowY, loc.ColX] = Tile.Land;
            }
            FoodTiles.Clear();
        }