Exemplo n.º 1
0
        public GameData GetStartData(
            Position startPlayerPosition,
            Position princessPosition,
            int maxPlayerHp,
            int gameFieldHeight,
            int gameFiledWidth)
        {
            var player = new Player()
            {
                Position     = startPlayerPosition,
                HealthPoints = maxPlayerHp
            };

            var gameField = new GameField(gameFieldHeight, gameFiledWidth);

            _fieldFiller.SpawnWalls(gameField);
            _fieldFiller.SpawnPlayer(gameField, player);
            _fieldFiller.SpawnPrincess(gameField, new Princess(), princessPosition);

            return(new GameData()
            {
                Player = player,
                GameField = gameField
            });
        }
Exemplo n.º 2
0
        public GameData GetStartData(
            Position startPlayerPosition,
            Position princessPosition,

            int maxPlayerHp,
            int gameFieldHeight,
            int gameFiledWidth)
        {
            var player = new Player()
            {
                Position     = startPlayerPosition,
                HealthPoints = maxPlayerHp
            };
            var bomb1 = new List <Bomb>();

            var gameField = new GameField(gameFieldHeight, gameFiledWidth);

            _fieldFiller.SpawnWalls(gameField);
            _fieldFiller.SpawnPlayer(gameField, player);
            _fieldFiller.SpawnPrincess(gameField, new Princess(), princessPosition);
            _fieldFiller.SpawnBombs(gameField);
            IPlaceableBomb placeableBomb = new Bomb();

            for (int i = 0; i < countBombs; i++)
            {
                placeableBomb.Bombs.Add(GetBomb());
            }
            return(new GameData()
            {
                Player = player,
                GameField = gameField,
                Bomb = placeableBomb
            });
        }