package cz.jzitnik.game.sprites;

import cz.jzitnik.tui.Sprite;

import java.util.HashMap;

public class Sheep extends Sprite<Sheep.SheepState> {
    public enum SheepState {
        WHITE_LEFT, WHITE_RIGHT, WHITE_LEFT_HURT, WHITE_RIGHT_HURT,

        LIGHT_GRAY_LEFT, LIGHT_GRAY_RIGHT, LIGHT_GRAY_LEFT_HURT, LIGHT_GRAY_RIGHT_HURT,

        GRAY_LEFT, GRAY_RIGHT, GRAY_LEFT_HURT, GRAY_RIGHT_HURT,

        BLACK_LEFT, BLACK_RIGHT, BLACK_LEFT_HURT, BLACK_RIGHT_HURT,

        BROWN_LEFT, BROWN_RIGHT, BROWN_LEFT_HURT, BROWN_RIGHT_HURT,

        PINK_LEFT, PINK_RIGHT, PINK_LEFT_HURT, PINK_RIGHT_HURT,
    }

    public Sheep() {
        loadResources(new HashMap<>() {
            {
                put(SheepState.WHITE_LEFT, "mobs/sheep/white/left.ans");
                put(SheepState.WHITE_RIGHT, "mobs/sheep/white/right.ans");
                put(SheepState.WHITE_LEFT_HURT, "mobs/sheep/white/lefthurt.ans");
                put(SheepState.WHITE_RIGHT_HURT, "mobs/sheep/white/righthurt.ans");

                put(SheepState.LIGHT_GRAY_LEFT, "mobs/sheep/light_gray/left.ans");
                put(SheepState.LIGHT_GRAY_RIGHT, "mobs/sheep/light_gray/right.ans");
                put(SheepState.LIGHT_GRAY_LEFT_HURT, "mobs/sheep/light_gray/lefthurt.ans");
                put(SheepState.LIGHT_GRAY_RIGHT_HURT, "mobs/sheep/light_gray/righthurt.ans");

                put(SheepState.GRAY_LEFT, "mobs/sheep/gray/left.ans");
                put(SheepState.GRAY_RIGHT, "mobs/sheep/gray/right.ans");
                put(SheepState.GRAY_LEFT_HURT, "mobs/sheep/gray/lefthurt.ans");
                put(SheepState.GRAY_RIGHT_HURT, "mobs/sheep/gray/righthurt.ans");

                put(SheepState.BLACK_LEFT, "mobs/sheep/black/left.ans");
                put(SheepState.BLACK_RIGHT, "mobs/sheep/black/right.ans");
                put(SheepState.BLACK_LEFT_HURT, "mobs/sheep/black/lefthurt.ans");
                put(SheepState.BLACK_RIGHT_HURT, "mobs/sheep/black/righthurt.ans");

                put(SheepState.BROWN_LEFT, "mobs/sheep/brown/left.ans");
                put(SheepState.BROWN_RIGHT, "mobs/sheep/brown/right.ans");
                put(SheepState.BROWN_LEFT_HURT, "mobs/sheep/brown/lefthurt.ans");
                put(SheepState.BROWN_RIGHT_HURT, "mobs/sheep/brown/righthurt.ans");

                put(SheepState.PINK_LEFT, "mobs/sheep/pink/left.ans");
                put(SheepState.PINK_RIGHT, "mobs/sheep/pink/right.ans");
                put(SheepState.PINK_LEFT_HURT, "mobs/sheep/pink/lefthurt.ans");
                put(SheepState.PINK_RIGHT_HURT, "mobs/sheep/pink/righthurt.ans");
            }
        }, SheepState.class);
    }

    public String getSprite() {
        return getResource(SheepState.WHITE_RIGHT);
    }

    public String getSprite(SheepState state) {
        return getResource(state);
    }
}
