Ejemplo n.º 1
0
        public void EndActions()
        {
            if (GameMap.IsGameOver)
            {
                Application.Restart();
            }
            var creaturesPerLocation = GetObjectsInCell();

            for (var x = 0; x < GameMap.MapWidth; x++)
            {
                for (var y = 0; y < GameMap.MapHeight; y++)
                {
                    GameMap.Map[x, y] = SelectCellWinner(creaturesPerLocation, x, y);
                    if (doesSpawn)
                    {
                        GameMap.Map[0, y]     = new Enemy();
                        GameMap.EnemyCounter -= 1;
                        doesSpawn             = false;
                    }
                }
            }
            if (GameMap.EnemyCounter < 0)
            {
                PrepareMapForBoss();
            }
            if (GameMap.IsOver)
            {
                GameMap.CreateMap();
                GameMap.IsOver = false;
            }
        }
Ejemplo n.º 2
0
 private static void Main()
 {
     GameMap.PrepareMaps();
     GameMap.CreateMap();
     Application.Run(new StartMenu());
 }