package pathgame.tilemap;

public class Tiles
{
    public final static Tile GRASS = buildGrass();
    public final static Tile GRASS_WITH_STONE = buildGrass();
    public final static Tile GRASS_WITH_6_BUSHES = buildGrass();
    public final static Tile GRASS_WITH_3_BUSHES = buildGrass();
    public final static Tile GRASS_WITH_FLOWERS_1 = buildGrass();
    public final static Tile GRASS_WITH_FLOWERS_2 = buildGrass();
    public final static Tile GRASS_WITH_FLOWERS_3 = buildGrass();
    public final static Tile GRASS_WITH_FLOWERS_4 = buildGrass();
    public final static Tile GRASS_WITH_HILL = buildGrass();
    public final static Tile GRASS_WITH_EARTH = buildGrass();
    
    public final static Tile[] GRASS_VARIANTS = new Tile[]
    {
        GRASS, GRASS_WITH_STONE, GRASS_WITH_6_BUSHES, GRASS_WITH_3_BUSHES, 
        GRASS_WITH_FLOWERS_1, GRASS_WITH_FLOWERS_2, GRASS_WITH_FLOWERS_3,
        GRASS_WITH_FLOWERS_4, GRASS_WITH_HILL, GRASS_WITH_EARTH
    };
    
    public final static Tile FOREST = Tile.TileBuilder.create()
            .setEnergyCost(2)
            .setForestReplaceChance(0.0f)
            .setSpeedUp((pa) -> pa.getFasterForest())
            .build();
    public final static Tile SWAMP = buildSwamp();
    public final static Tile SWAMP_DECO = buildSwamp();
    public final static Tile SWAMP_TREE = buildSwamp();
    public final static Tile SHALLOW_WATER = Tile.TileBuilder.create()
            .setEnergyCost(3)
            .setForestReplaceChance(0.0f)
            .setSpeedUp((pa) -> pa.getFasterShallowWater())
            .noTown()
            .build();
    public final static Tile DEEP_WATER = Tile.TileBuilder.create()
            .setEnergyCost(3)
            .setForestReplaceChance(0.0f)
            .setSpeedUp((pa) -> pa.getFasterDeepWater())
            .noTown()
            .build();
    public final static Tile HILL = Tile.TileBuilder.create()
            .setEnergyCost(3)
            .setForestReplaceChance(0.5f)
            .setSpeedUp((pa) -> pa.getFasterHill())
            .build();
    public final static Tile MOUNTAIN = Tile.TileBuilder.create()
            .setEnergyCost(5)
            .setForestReplaceChance(0.0f)
            .setSpeedUp((pa) -> pa.getFasterMountain())
            .noTown()
            .build();
    public final static Tile TOWN = new TileTown();
    public final static Tile TOWN_BLOCKED_1 = buildBlockedTown();
    public final static Tile TOWN_BLOCKED_2 = buildBlockedTown();
    public final static Tile TOWN_BLOCKED_3 = buildBlockedTown();
    public final static Tile TOWN_BLOCKED_4 = buildBlockedTown();
    
    public final static Tile[] TOWN_BLOCKED = new Tile[]
    {
        TOWN_BLOCKED_1, TOWN_BLOCKED_2, TOWN_BLOCKED_3, TOWN_BLOCKED_4
    };
    
    public final static Tile PORT = Tile.TileBuilder.create()
            .noTown()
            .setForestReplaceChance(0.0f)
            .build();
    
    public final static Tile buildGrass()
    {
        return Tile.TileBuilder.create()
                .setSpeedUp((pa) -> pa.getFasterGrass())
                .build();
    }
    
    public final static Tile buildSwamp()
    {
        return Tile.TileBuilder.create()
                .setEnergyCost(3)
                .setForestReplaceChance(0.0f)
                .build();
    }
    
    public final static Tile buildBlockedTown()
    {
        return Tile.TileBuilder.create()
                .setForestReplaceChance(0.0f)
                .noTown()
                .noMovement()
                .build();
    }
}
