Esempio n. 1
0
 //Pick a new search location to hunt for the player
 public Vector3 newSearch(Enemy ship, Vector3 curPos)
 {
     Vector3 loc = new Vector3(coord(), coord(), curPos.Z);
     while (!hasValidPath(ship, loc))    //If the new search location has terrain blocking it, find a new one
     {
         loc = new Vector3(coord(), coord(), curPos.Z);
     }
     return loc;
 }
Esempio n. 2
0
 // Find a new target for the player
 public void SwitchEnemy()
 {
     foreach (var obj in game.gameObjects)
     {
         if (obj.type == GameObjectType.Enemy)
         {
             target = (Enemy)obj;
             break;
         }
     }
 }
Esempio n. 3
0
        // Constructor for the player as the shooter
        public Projectile(ProjectGame game, string model_name, Vector3 pos, float velocity, Enemy target, GameObjectType targetType)
        {
            this.game = game;
            this.pos = pos;
            this.velocity = velocity;
            this.target = target;
            this.targetType = targetType;
            hitRadius = 5;
            squareHitRadius = hitRadius * hitRadius;
            collisionRadius = squareHitRadius;
            scaling = 1.5f;

            model = game.Content.Load<Model>(model_name);
            basicEffect = new BasicEffect(game.GraphicsDevice)
            {
                World = Matrix.Identity,
                View = game.camera.View,
                Projection = game.camera.Projection
            };
            BasicEffect.EnableDefaultLighting(model, true);
        }
        // Create enemies at random location
        public void spawnEnemies()
        {
            // More enemies in difficult mode
            int numEnemies = game.hardDifficulty == true ? 20 : 10;

            // Spawn enemies at random locations
            for (int i = 0; i < numEnemies; i++)
            {
                Vector3 pos = game.landscape.getStartPoint();
                // Change if that position is already taken
                foreach (Enemy e in enemies)
                {
                    if (pos == e.pos) { pos = game.landscape.getStartPoint(); }
                }

                float size = rand.NextFloat(0.1f, 2.5f);
                Color color = rand.NextColor();
                Enemy enemy = new Enemy(game, pos, size, color);
                enemies.Add(enemy);
            }
        }
Esempio n. 5
0
        // Constructor with the enemy as the shooter
        public Projectile(ProjectGame game, Enemy shooter, Vector3 pos, float velocity, Vector3 targetPos, GameObjectType targetType)
        {
            this.game = game;
            this.shooter = shooter;
            this.pos = pos;
            this.velocity = velocity;
            this.targetPos = targetPos;
            this.targetType = targetType;
            squareHitRadius = hitRadius * hitRadius;
            collisionRadius = squareHitRadius;
            isTargetPlayer = true;
            scaling = 8;

            model = game.Content.Load<Model>("Sphere");
            basicEffect = new BasicEffect(game.GraphicsDevice)
            {
                World = Matrix.Identity,
                View = game.camera.View,
                Projection = game.camera.Projection
            };
            BasicEffect.EnableDefaultLighting(model, true);
        }
Esempio n. 6
0
        //Function to check if the given enemy has a path to its search location
        private bool hasValidPath(Enemy ship, Vector3 point)
        {
            Vector2 topoint = new Vector2(point.X - ship.pos.X, point.Y - ship.pos.Y);
            Vector2 testpoint = new Vector2(ship.pos.X, ship.pos.Y);
            for (float i = 0.01f; i < 1; i += 0.01f)
            {
                testpoint.X = (int)(ship.pos.X + topoint.X * i) + game.edgemax;
                testpoint.Y = (int)(ship.pos.Y + topoint.Y * i) + game.edgemax;

                if (game.worldBase.heights[(int)testpoint.X][(int)testpoint.Y].Z < -game.ocean.sealevel)
                {
                    return false;
                }
            }
            return true;
        }
Esempio n. 7
0
        public void createEnemy(Game game, Vector3 pos)
        {
            GameObject body = createGameObject(game, Vector3.Zero, "sphere", "enemy");   //Enemy body
            GameObject fist = createGameObject(game, Vector3.Zero, "sphere", "enemy_fist");   //Enemy fist
            gameobjs.Add(body);
            gameobjs.Add(fist);

            //Add the body and fist of enemy to gameobjs
            enemy = new Enemy(game, player, level, body, fist, pos);
            enemy.body.setPosition(pos);
            components.Add(enemy);

            physworld.addCollisionEvent(enemy.body.physobj, enemy.fist.physobj);
        }
Esempio n. 8
0
        protected override void Update(GameTime gameTime)
        {
            presentKey = Keyboard.GetState();
            MouseState mouse = Mouse.GetState();
            Rectangle mouseRectangle = new Rectangle(mouse.X, mouse.Y, 1, 1);

            if (CurrentGameState == GameState.Playing && !paused && !inventaire && !talking)
            {
                IsMouseVisible = false;
            }
            else
            {
                IsMouseVisible = true;
            }

            switch (CurrentGameState)
            {
                case GameState.Video:

                    if (playOnce)
                    {

                        playOnce = false;
                    }

                    if (presentKey.IsKeyDown(Keys.Enter) && pastKey.IsKeyUp(Keys.Enter))
                    {

                        CurrentGameState = GameState.MainMenu;
                        MediaPlayer.Play(song1);
                    }
                     break;

                case GameState.Title:

                    if (presentKey.IsKeyDown(Keys.Enter))
                    {
                        CurrentGameState = GameState.Video;
                        playerVideo.Play(video);

                    }
                    break;

                case GameState.MainMenu:

                    if (btnPlay.isClicked == true)
                    {
                        MediaPlayer.Stop();
                        CurrentGameState = GameState.Playing;
                        MediaPlayer.Play(song2);
                    }

                    if (btnOptions.isClicked == true)
                        CurrentGameState = GameState.Options;

                    if (btnQuit.isClicked == true)
                        Exit();

                    btnOptions.Update(mouse, gameTime);
                    btnQuit.Update(mouse, gameTime);
                    btnPlay.Update(mouse, gameTime);
                    break;

                case GameState.Playing:

                    if (map == map5)
                    {
                        //Enemy
                        if (enemy1.health > 0)
                            enemy1.Update(gameTime, player.persoPosition);

                        if (enemy2.health > 0)
                            enemy2.Update(gameTime, player.persoPosition);
                        if (enemy1.Collision(player.persoPosition))
                        {
                            previousPosX = player.persoPosition.X;
                            previousPosY = player.persoPosition.Y;
                            turn = -1;
                            btnEndFight.isClicked = false;
                            Isfighting = true;
                            MediaPlayer.Play(song3);
                            enemy = enemy1;
                            attackChoisi = "";
                        }
                        else if (enemy2.Collision(player.persoPosition))
                        {
                            previousPosX = player.persoPosition.X;
                            previousPosY = player.persoPosition.Y;
                            turn = -1;
                            Isfighting = true;
                            MediaPlayer.Play(song3);
                            btnEndFight.isClicked = false;
                            enemy = enemy2;
                            attackChoisi = "";
                        }
                        foreach (CollisionTiles tile in map5.CollisionTiles)
                        {
                            if (tile.num >= 7)
                                player.Collision(tile.Rectangle);
                        }
                    }

                    if (map == map8)
                    {
                        //Moteur à particules
                        snow.update(gameTime, graphics.GraphicsDevice);
                        foreach (CollisionTiles tile in map8.CollisionTiles)
                        {
                            if (tile.num >= 7)
                                player.Collision(tile.Rectangle);
                        }
                        if (player.persoPosition.X <= 250 && player.persoPosition.X >= 200 && player.persoPosition.Y < 350 && player.persoPosition.Y > 280)
                            bookState = 1;
                    }
                    if (player.persoPosition.Y <= 0)
                    {
                        map = map8;
                        player.persoPosition.Y = (screenHeight - player.persoTexture.Height / 4);
                    }
                    else if (player.persoPosition.Y >= screenHeight - player.persoTexture.Height / 4)
                    {
                        map = map5;
                        player.persoPosition.Y = player.persoTexture.Height / 4 - 40;
                    }
                    if (Isfighting)
                    {
                        CurrentGameState = GameState.Fight;
                    }

                    if (!paused && !inventaire)
                    {
                        timerInventaire++;

                        //Perso
                        player.Update(gameTime);

                        //PNJ
                        if (pnj1.Collision(player.persoPosition))
                        {
                            talking = true;
                        }
                        if (talking)
                        {
                            btnNext.Update(mouse, gameTime);
                            if (btnNext.isClicked)
                                bookState = 2;
                            if (!pnj1.Collision(player.persoPosition))
                                talking = false;
                        }

                        if (Keyboard.GetState().IsKeyDown(Keys.Escape))
                        {
                            btnPlay2.isClicked = false;
                            btnPlay2.Update(mouse, gameTime);
                            btnPlay3.isClicked = false;
                            btnPlay3.Update(mouse, gameTime);
                            btnOptions2.isClicked = false;
                            btnOptions2.Update(mouse, gameTime);
                            paused = true;
                        }

                        if (timerInventaire > 15)
                        {
                            if (Keyboard.GetState().IsKeyDown(Keys.I))
                            {
                                inventaire = true;
                                timerInventaire = 0;
                            }
                        }
                    }
                    else if (inventaire)
                    {
                        timerInventaire++;
                        if (timerInventaire > 15)
                        {
                            if (Keyboard.GetState().IsKeyDown(Keys.I))
                            {
                                inventaire = false;
                                timerInventaire = 0;
                            }
                        }

                    }

                    else if (paused)
                    {

                        MediaPlayer.Pause();
                        if (btnPlay2.isClicked)
                        {
                            paused = false;
                            MediaPlayer.Resume();
                        }
                        else if (btnOptions2.isClicked)
                        {
                            CurrentGameState = GameState.Options;
                            MediaPlayer.Resume();
                        }
                        if (btnQuit2.isClicked)
                            Exit();

                        btnPlay2.Update(mouse, gameTime);
                        btnOptions2.Update(mouse, gameTime);
                        btnQuit2.Update(mouse, gameTime);
                    }

                    break;

                case GameState.Options:
                    timerOptions++;
                    if (timerOptions > 5)
                    {
                        if (btnPlay3.isClicked)
                        {
                            timerOptions = 0;
                            paused = false;
                            CurrentGameState = GameState.Playing;
                        }
                        if (btnVolume0.isClicked)
                        {
                            MediaPlayer.Volume = 0.0f;
                            btnVolume25.isClicked = false;
                            btnVolume50.isClicked = false;
                            btnVolume75.isClicked = false;
                            btnVolume100.isClicked = false;
                            btnVolume0.Update(mouse, gameTime);
                            btnVolume25.Update(mouse, gameTime);
                            btnVolume50.Update(mouse, gameTime);
                            btnVolume75.Update(mouse, gameTime);
                            btnVolume100.Update(mouse, gameTime);
                        }

                        if (btnVolume25.isClicked)
                        {
                            MediaPlayer.Volume = 0.25f;
                            btnVolume0.isClicked = false;
                            btnVolume50.isClicked = false;
                            btnVolume75.isClicked = false;
                            btnVolume100.isClicked = false;
                            btnVolume0.Update(mouse, gameTime);
                            btnVolume25.Update(mouse, gameTime);
                            btnVolume50.Update(mouse, gameTime);
                            btnVolume75.Update(mouse, gameTime);
                            btnVolume100.Update(mouse, gameTime);
                        }

                        if (btnVolume50.isClicked)
                        {
                            MediaPlayer.Volume = 0.5f;
                            btnVolume0.isClicked = false;
                            btnVolume25.isClicked = false;
                            btnVolume75.isClicked = false;
                            btnVolume100.isClicked = false;
                            btnVolume0.Update(mouse, gameTime);
                            btnVolume25.Update(mouse, gameTime);
                            btnVolume50.Update(mouse, gameTime);
                            btnVolume75.Update(mouse, gameTime);
                            btnVolume100.Update(mouse, gameTime);
                        }
                        if (btnVolume75.isClicked)
                        {
                            MediaPlayer.Volume = 0.75f;
                            btnVolume0.isClicked = false;
                            btnVolume25.isClicked = false;
                            btnVolume50.isClicked = false;

                            btnVolume100.isClicked = false;
                            btnVolume0.Update(mouse, gameTime);
                            btnVolume25.Update(mouse, gameTime);
                            btnVolume50.Update(mouse, gameTime);
                            btnVolume75.Update(mouse, gameTime);
                            btnVolume100.Update(mouse, gameTime);
                        }
                        if (btnVolume100.isClicked)
                        {
                            MediaPlayer.Volume = 1.0f;
                            btnVolume0.isClicked = false;
                            btnVolume25.isClicked = false;
                            btnVolume50.isClicked = false;
                            btnVolume75.isClicked = false;
                            btnVolume0.Update(mouse, gameTime);
                            btnVolume25.Update(mouse, gameTime);
                            btnVolume50.Update(mouse, gameTime);
                            btnVolume75.Update(mouse, gameTime);
                            btnVolume100.Update(mouse, gameTime);
                        }

                        btnVolume0.Update(mouse, gameTime);
                        btnVolume25.Update(mouse, gameTime);
                        btnVolume50.Update(mouse, gameTime);
                        btnVolume75.Update(mouse, gameTime);
                        btnVolume100.Update(mouse, gameTime);
                        btnPlay3.Update(mouse, gameTime);

                    }

                    break;

                case GameState.Fight:

                    player.persoPosition.X = 200;
                    player.persoPosition.Y = screenHeight / 2 + 100;
                    player.fight = true;
                    player.colonne = 2;
                    player.Direction = "right";
                    player.Update(gameTime);
                    healthBoxRectangle = new Rectangle(10, 10, healthBoxTexture.Width, healthBoxTexture.Height);
                    healthRectangle = new Rectangle(16, 14, (player.health * 379) / player.healthMax, 35);
                    manaRectangle = new Rectangle(115, 62, (player.mana * 280) / player.manaMax, manaTexture.Height);
                    enemyHealthRectangle = new Rectangle((1030 - enemy.health / 2), (screenHeight / 2 - enemyHealthTexture.Height / 2 + 100), enemy.health, enemyHealthTexture.Height);
                    if (turn == -1 && btnStartFight.isClicked)
                    {
                        turn = 0;
                    }
                    if (turn % 2 == 0 && player.health > 0 && enemy.health > 0)
                    {
                        if (btnAttack1.isClicked && pastMouse.LeftButton == ButtonState.Released)
                        {
                            btnAttack1.isClicked = false;
                            attackChoisi = "Basic attack";
                            btnAttack1.Update(mouse, gameTime);
                            degat = rand.Next(15, 20);
                            manaPerdu = 0;
                        }

                        if (btnSpell.isClicked && pastMouse.LeftButton == ButtonState.Released)
                        {
                            btnSpell.isClicked = false;
                            attackChoisi = "Fire Ball";
                            btnSpell.Update(mouse, gameTime);
                            degat = rand.Next(150, 170);
                            manaPerdu = 20;

                        }
                        if (presentKey.IsKeyDown(Keys.Enter) && pastKey.IsKeyUp(Keys.Enter) && (attackChoisi == "Basic attack" || attackChoisi == "Fire Ball"))
                        {
                            if (degat >= enemy.health)
                            {
                                MediaPlayer.Play(songVictory);
                            }
                            enemy.health -= degat;
                            player.mana -= manaPerdu;
                            turn++;
                            attackChoisi = "";

                        }

                    }

                    else if (presentKey.IsKeyDown(Keys.Enter) && pastKey.IsKeyUp(Keys.Enter) && turn % 2 == 1 && player.health > 0 && enemy.health > 0)
                    {
                        player.health -= rand.Next(100, 120);
                        turn++;
                    }
                    if (player.health <= 0)
                    {
                        CurrentGameState = GameState.GameOver;
                        MediaPlayer.Play(songGameOver);
                    }
                    if (enemy.health <= 0)
                    {
                        enemy.health = 0;

                        if (btnEndFight.isClicked)
                        {
                            player.persoPosition.X = previousPosX;
                            player.persoPosition.Y = previousPosY;
                            player.fight = false;
                            btnStartFight.isClicked = false;
                            CurrentGameState = GameState.Playing;
                            Isfighting = false;
                            enemy.enemyPosition.X = -100;
                            enemy.enemyPosition.Y = -100;
                            MediaPlayer.Play(song2);
                        }
                    }

                    btnStartFight.Update(mouse, gameTime);
                    btnAttack1.Update(mouse, gameTime);
                    btnObjects.Update(mouse, gameTime);
                    btnSpell.Update(mouse, gameTime);
                    btnEndFight.Update(mouse, gameTime);

                    break;

                case GameState.GameOver:

                    break;
            }

            pastKey = presentKey;
            pastMouse = mouse;
            base.Update(gameTime);
        }
Esempio n. 9
0
        protected override void LoadContent()
        {
            IsMouseVisible = true;

            // Screen stuff
            graphics.PreferredBackBufferWidth = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            //  graphics.IsFullScreen = true;
            graphics.ApplyChanges();

            spriteBatch = new SpriteBatch(GraphicsDevice);

            song1 = Content.Load<Song>("Song/Song1");
            song2 = Content.Load<Song>("Song/Song2");
            song3 = Content.Load<Song>("Song/SongFight");
            songGameOver = Content.Load<Song>("Song/songGameOver");
            songVictory = Content.Load<Song>("Song/Victory");
            //Video
            video = Content.Load<Video>("Intro");
            playerVideo = new VideoPlayer();
            //Button
            btnPlay = new cButton(Content.Load<Texture2D>("Button/PlayButton"), graphics.GraphicsDevice, 100, 75);
            btnPlay.setPosition(new Vector2(screenWidth / 2 - btnPlay.size.X / 2, screenHeight / 2 - 100));

            btnOptions = new cButton(Content.Load<Texture2D>("Button/OptionsButton"), graphics.GraphicsDevice, 250, 100);
            btnOptions.setPosition(new Vector2(screenWidth / 2 - btnOptions.size.X / 2, screenHeight / 2));

            btnQuit = new cButton(Content.Load<Texture2D>("Button/QuitButton"), graphics.GraphicsDevice, 100, 75);
            btnQuit.setPosition(new Vector2(screenWidth / 2 - btnQuit.size.X / 2, screenHeight / 2 + 125));

            //Fight
            btnStartFight = new cButton(Content.Load<Texture2D>("Button/StartFight"), graphics.GraphicsDevice, 150, 70);
            btnStartFight.setPosition(new Vector2(screenWidth / 2 - 100, screenHeight / 2));

            btnAttack1 = new cButton(Content.Load<Texture2D>("Button/AttackButton"), graphics.GraphicsDevice, 120, 45);
            btnAttack1.setPosition(new Vector2(50, screenHeight / 2 + 200));

            btnSpell = new cButton(Content.Load<Texture2D>("Button/SpellButton"), graphics.GraphicsDevice, 120, 45);
            btnSpell.setPosition(new Vector2(170, screenHeight / 2 + 200));

            btnObjects = new cButton(Content.Load<Texture2D>("Button/ObjectsButton"), graphics.GraphicsDevice, 120, 45);
            btnObjects.setPosition(new Vector2(100, screenHeight / 2 + 250));

            btnEndFight = new cButton(Content.Load<Texture2D>("Button/EndFight"), graphics.GraphicsDevice, 75, 44);
            btnEndFight.setPosition(new Vector2(1200, 710));

            //Enemy
            enemy1 = new Enemy(Content.Load<Texture2D>("Sprites/enemy"), new Vector2(800, 600), new Rectangle(600 - 30, 800, 30, 59), new Rectangle(0, 0, 30, 59), 200);
            enemy2 = new Enemy(Content.Load<Texture2D>("Sprites/enemy"), new Vector2(350, 400), new Rectangle(438 - 30, 350, 30, 59), new Rectangle(0, 0, 30, 59), 400);

            //PNJ
            pnj1 = new PNJ(Content.Load<Texture2D>("pnj1"), new Vector2(1100, 280));

            //Speech
            btnNext = new cButton(Content.Load<Texture2D>("Button/Next"), graphics.GraphicsDevice, 75, 44);
            btnNext.setPosition(new Vector2(1200, 710));

            speechBoxTexture = Content.Load<Texture2D>("SpeechBox");
            speechBoxRectangle = new Rectangle(0, 700, speechBoxTexture.Width, speechBoxTexture.Height);

            //Pause
            pausedTexture = Content.Load<Texture2D>("Menu/Paused");
            pausedRectangle = new Rectangle(0, 0, pausedTexture.Width, pausedTexture.Height);

            btnPlay2 = new cButton(Content.Load<Texture2D>("Button/PlayButton2"), graphics.GraphicsDevice, 100, 75);
            btnPlay2.setPosition(new Vector2(screenWidth / 2 - btnPlay.size.X / 2, screenHeight / 2 - 100));

            btnOptions2 = new cButton(Content.Load<Texture2D>("Button/OptionsButton2"), graphics.GraphicsDevice, 250, 100);
            btnOptions2.setPosition(new Vector2(screenWidth / 2 - btnOptions2.size.X / 2, screenHeight / 2));

            btnQuit2 = new cButton(Content.Load<Texture2D>("Button/QuitButton2"), graphics.GraphicsDevice, 100, 75);
            btnQuit2.setPosition(new Vector2(screenWidth / 2 - btnQuit2.size.X / 2, screenHeight / 2 + 125));

            //inventaire
            inventaireTexture = Content.Load<Texture2D>("Menu/inventaire");
            inventaireRectangle = new Rectangle(0, 0, inventaireTexture.Width, inventaireTexture.Height);

            //Book
            bookTexture = Content.Load<Texture2D>("Book");
            bookRectangle = new Rectangle(200, 330, bookTexture.Width, bookTexture.Height);
            bookRectangle2 = new Rectangle(30, 45, bookTexture.Width, bookTexture.Height);

            //Options
            btnVolume0 = new cButton(Content.Load<Texture2D>("Volume/volume0"), graphics.GraphicsDevice, 100, 75);
            btnVolume0.setPosition(new Vector2(screenWidth / 8 - btnVolume0.size.X / 2 + 100, screenHeight / 2));

            btnVolume25 = new cButton(Content.Load<Texture2D>("Volume/volume25"), graphics.GraphicsDevice, 100, 75);
            btnVolume25.setPosition(new Vector2(screenWidth / 8 - btnVolume25.size.X / 2 + 300, screenHeight / 2));

            btnVolume50 = new cButton(Content.Load<Texture2D>("Volume/volume50"), graphics.GraphicsDevice, 100, 75);
            btnVolume50.setPosition(new Vector2(screenWidth / 8 - btnVolume50.size.X / 2 + 500, screenHeight / 2));

            btnVolume75 = new cButton(Content.Load<Texture2D>("Volume/volume75"), graphics.GraphicsDevice, 100, 75);
            btnVolume75.setPosition(new Vector2(screenWidth / 8 - btnVolume75.size.X / 2 + 700, screenHeight / 2));

            btnVolume100 = new cButton(Content.Load<Texture2D>("Volume/volume100"), graphics.GraphicsDevice, 100, 75);
            btnVolume100.setPosition(new Vector2(screenWidth / 8 - btnVolume100.size.X / 2 + 900, screenHeight / 2));

            btnPlay3 = new cButton(Content.Load<Texture2D>("Button/PlayButton3"), graphics.GraphicsDevice, 100, 75);
            btnPlay3.setPosition(new Vector2(screenWidth / 2 - btnPlay3.size.X / 2, screenHeight / 4));

            //health
            healthTexture = Content.Load<Texture2D>("Barres/Health");
            manaTexture = Content.Load<Texture2D>("Barres/Mana");
            healthBoxTexture = Content.Load<Texture2D>("Barres/HealthBox");
            enemyHealthTexture = Content.Load<Texture2D>("Barres/HealthEnemy");

            //TexteHealth
            spriteFont = Content.Load<SpriteFont>("SpriteFont1");

            //Moteur à particules
            snow = new ParticleGenerator(Content.Load<Texture2D>("snow"), graphics.GraphicsDevice.Viewport.Width, 50);

            //map
            Tiles.Content = Content;

            map8.Generate(new int[,]{
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,9,9,9,9,9,9,9,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,9,6,6,6,6,6,6,9,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,9,6,6,6,6,6,6,6,9,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,9,6,6,6,6,6,6,6,6,9,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,9,6,6,6,6,6,6,6,6,6,9,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,6,6,11,11,11,11,11,11,11,11,11,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,9,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,6,6,6,6,6,11,11,11,11,11,11,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,9,11,11,11,},
               {11,11,11,11,11,11,11,6,6,6,6,6,6,6,6,11,11,11,11,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,11,11,11,11,11,11,},
               {11,11,11,11,11,11,6,6,6,6,6,9,6,6,6,6,11,11,6,6,6,11,11,11,11,6,6,6,6,6,6,6,6,6,6,6,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,6,6,6,6,9,9,9,6,6,6,6,6,6,6,11,11,11,11,11,11,6,6,6,6,6,6,6,6,6,6,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,6,6,6,6,6,9,6,6,6,6,6,6,6,11,11,11,11,11,11,11,11,6,6,6,6,6,6,6,6,6,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,6,6,6,6,6,6,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,6,6,6,6,6,6,6,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,6,6,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,6,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,},
               {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,6,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,},
               }, 32);

            map5.Generate(new int[,]{
               {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,4,5,4,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,},
               {1,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,1,1,1,1,1,4,5,4,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,},
               {1,1,1,10,10,10,10,10,10,1,1,10,10,10,10,10,10,10,1,1,1,1,1,1,4,5,4,1,1,10,10,10,10,10,10,10,10,10,10,10,10,10,10,},
               {1,1,1,1,10,10,10,1,1,1,1,10,10,10,1,10,10,1,1,1,1,1,1,1,4,5,4,1,1,1,1,1,1,10,10,10,10,10,10,10,10,10,10,},
               {1,1,1,1,8,8,8,1,1,1,1,4,5,4,4,4,4,4,4,1,1,1,1,1,4,5,4,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,10,},
               {1,1,1,1,8,8,8,8,8,1,1,4,5,5,5,5,5,5,4,1,1,4,4,4,4,5,4,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,},
               {1,1,1,8,8,8,8,8,8,8,8,4,4,4,4,4,4,5,4,1,1,4,5,5,5,5,4,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,},
               {1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,5,4,4,4,4,5,4,4,4,4,1,1,1,1,1,8,8,8,1,1,1,1,10,10,10,10,},
               {1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,4,1,1,1,1,1,1,1,1,8,8,8,8,1,1,10,10,10,10,10,},
               {1,1,1,1,1,1,4,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,4,1,1,1,1,1,1,1,8,8,8,8,8,1,1,1,10,10,10,10,},
               {4,4,4,4,4,4,4,5,4,4,4,4,4,4,4,4,4,1,1,1,1,4,5,4,1,1,1,1,1,1,8,8,8,8,8,8,1,1,1,1,10,10,10,},
               {5,5,5,5,5,5,5,5,4,1,1,1,1,1,1,1,1,1,1,1,1,4,5,4,1,1,1,1,1,1,8,8,8,1,1,1,1,1,1,1,10,10,10,},
               {4,4,4,4,4,4,4,5,4,1,1,1,1,1,1,1,1,1,1,1,1,4,5,4,4,1,1,1,1,1,1,8,1,1,1,1,1,1,1,10,10,10,10,},
               {1,1,1,1,1,1,4,5,4,1,4,4,1,1,1,1,1,1,1,1,1,4,5,5,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,},
               {1,1,1,1,1,1,4,5,4,4,4,5,4,1,1,1,1,1,1,1,1,4,4,5,5,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,},
               {4,1,1,1,1,1,4,5,5,5,5,5,5,4,1,1,1,1,1,1,1,1,4,4,5,5,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,},
               {5,4,1,1,1,1,4,5,5,5,5,7,5,5,4,1,1,1,1,1,1,1,1,4,4,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,10,10,},
               {5,5,4,4,4,4,4,5,5,7,7,7,7,7,4,4,1,1,1,1,1,1,1,1,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,10,10,},
               {7,5,5,5,5,5,5,5,5,5,7,7,7,5,5,4,1,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,10,10,},
               {7,5,5,5,5,5,5,5,5,5,5,5,5,5,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,},
               {7,7,5,5,5,5,5,5,5,5,5,5,5,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,},
               {7,7,7,5,5,5,5,5,5,5,5,5,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,},
               {7,7,7,7,5,5,5,5,5,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,10,},
               {7,7,7,7,7,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,10,10,},
               }, 32);
            map = map5;
        }