Пример #1
0
        private void SeedPlayer(Player player, int offset)
        {
            Coordinate townCenterCoordinate = new Coordinate(offset, offset);
            TownCenter townCenter           = new TownCenter();

            player.AddEntity(townCenter);
            mapController.AddToMap(townCenterCoordinate, townCenter);

            Coordinate mineCoordinate = new Coordinate(offset + 2, offset + 2);
            Mine       mine           = new Mine();

            player.AddEntity(mine);
            mapController.AddToMap(mineCoordinate, mine);

            Coordinate workerCoordinate = new Coordinate(offset + 1, offset + 1);
            Worker     worker           = new Worker();

            player.AddEntity(worker);
            mapController.AddToMap(workerCoordinate, worker);
        }
Пример #2
0
 public override void Execute(MapController mapController, Player player, Entity entity, Coordinate coordinate, Entity target)
 {
     mapController.AddToMap(coordinate, target);
     player.AddEntity(target);
 }