private void Sea2(int x, int y, int size)
 {
     AreaGen area = new AreaGen();
     area.MazeGen(size, 5, false, 1, 1, 1, 0);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             int worldX = x - area.Center.X + i;
             int worldY = y - area.Center.Y + j;
             if (GetGround(worldX, worldY) == GroundTileType.Undefined || GetGround(worldX, worldY) == GroundTileType.Grass || GetGround(worldX, worldY) == GroundTileType.Ground)
             {
                 switch (area.GetTileType(i, j))
                 {
                     case AreaTileType.Depth: break;
                     case AreaTileType.Ground:
                         if (GetGround(worldX, worldY) == GroundTileType.Undefined)
                         {
                             SetGround(worldX, worldY, GroundTileType.Sea);
                         }
                         else
                         {
                             Beach(worldX, worldY, 10);
                         }
                         break;
                     case AreaTileType.Wall: SetGround(worldX, worldY, GroundTileType.Ground); break;
                     default: break;
                 }
             }
         }
     }
 }
 private void Town(int x, int y, int size)
 {
     AreaGen area = new AreaGen();
     area.MazeGen(size, 8, false, 3, 1, 0.1, 0);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             switch (area.GetTileType(i, j))
             {
                 case AreaTileType.Depth: break;
                 case AreaTileType.Ground: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Street); break;
                 case AreaTileType.Wall: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Building); break;
                 default: break;
             }
         }
     }
 }
 private void Road(int x, int y, int x2, int y2)
 {
     AreaGen area = new AreaGen();
     area.LineGen(x2 - x, y2 - y, 1, 1, 1, 0, 5);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             switch (area.GetTileType(i, j))
             {
                 case AreaTileType.Depth: break;
                 case AreaTileType.Ground: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Street); break;
                 case AreaTileType.Wall: break;
                 default: break;
             }
         }
     }
 }
 private void Sea(int x, int y, int stretchX, int stretchY, int stretchBase, int size)
 {
     AreaGen area = new AreaGen();
     area.StretchedMazeGen(size, 3, stretchX, stretchY, stretchBase, false, 4, 1, 0.9, 0.7);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             int worldX = x - area.Center.X + i;
             int worldY = y - area.Center.Y + j;
             if (GetGround(worldX, worldY) == GroundTileType.Undefined)
             {
                 switch (area.GetTileType(i, j))
                 {
                     case AreaTileType.Depth: break;
                     case AreaTileType.Ground: SetGround(worldX, worldY, GroundTileType.Sea); break;
                     case AreaTileType.Wall: SetGround(worldX, worldY, GroundTileType.Ground); break;
                     default: break;
                 }
             }
         }
     }
 }
        private void Mountain2(int x, int y, int size, List<AreaTile> sources)
        {
            AreaGen area = new AreaGen();
            area.HillGen2(size, sources, 15, 100);
            for (int i = 0; i < area.Width; i++)
            {
                for (int j = 0; j < area.Height; j++)
                {
                    switch (area.GetTileType(i, j))
                    {
                        case AreaTileType.Depth: break;
                        case AreaTileType.Ground: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Ground); break;
                        case AreaTileType.Wall: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Mountain); break;
                        default: break;
                    }
                }
            }

            //todo si rencontre avec une autre montagne enlever tout le rayon exterieur ?
        }
        private void Meadow(int x, int y, int size)
        {
            AreaGen area = new AreaGen();
            area.MazeGen(size, 5, false, 1, 1, 0.3, 1);
            for (int i = 0; i < area.Width; i++)
            {
                for (int j = 0; j < area.Height; j++)
                {
                    int worldX = x - area.Center.X + i;
                    int worldY = y - area.Center.Y + j;
                    if (GetGround(worldX, worldY) == GroundTileType.Undefined)
                    {
                        switch (area.GetTileType(i, j))
                        {
                            case AreaTileType.Depth: break;
                            case AreaTileType.Ground: SetGround(worldX, worldY, GroundTileType.Grass); break;
                            case AreaTileType.Wall: SetTile(worldX, worldY, GroundTileType.Grass, ObjectTileType.Bush); break;
                            default: break;
                        }

                        if (hasAdjTileOfType(worldX, worldY, GroundTileType.Ground))
                        {
                            SetObject(worldX, worldY, ObjectTileType.Tree);
                        }
                    }
                }
            }
        }
 private void Land(int x, int y, int size)
 {
     AreaGen area = new AreaGen();
     area.MazeGen(size, 5, false, 1, 1, 0.5, 1);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             int worldX = x - area.Center.X + i;
             int worldY = y - area.Center.Y + j;
             if (GetGround(worldX, worldY) == GroundTileType.Undefined)
             {
                 switch (area.GetTileType(i, j))
                 {
                     case AreaTileType.Depth: break;
                     case AreaTileType.Ground: SetGround(worldX, worldY, GroundTileType.Ground); break;
                     case AreaTileType.Wall: SetTile(worldX, worldY, GroundTileType.Ground, ObjectTileType.Rock); break;
                     default: break;
                 }
             }
         }
     }
 }
 private void Forest(int x, int y, int size)
 {
     AreaGen area = new AreaGen();
     area.MazeGen(size, 10, false, 3, 0.1, 0, 0.4);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             switch (area.GetTileType(i, j))
             {
                 case AreaTileType.Depth: break;
                 case AreaTileType.Ground: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Grass); break;
                 case AreaTileType.Wall: SetTile(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Grass, ObjectTileType.Tree); break;
                 default: break;
             }
         }
     }
 }
 private void Coast(int x, int y, int stretchX, int stretchY, int stretchBase, int size)
 {
     AreaGen area = new AreaGen();
     area.StretchedMazeGen(size, 3, stretchX, stretchY, stretchBase, false, 2, 1, 0, 0.7);
     for (int i = 0; i < area.Width; i++)
     {
         for (int j = 0; j < area.Height; j++)
         {
             switch (area.GetTileType(i, j))
             {
                 case AreaTileType.Depth: break;
                 case AreaTileType.Ground: SetGround(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Sea); break;
                 case AreaTileType.Wall: SetTile(x - area.Center.X + i, y - area.Center.Y + j, GroundTileType.Sea, ObjectTileType.Rock); break;
                 default: break;
             }
         }
     }
 }