package cz.jzitnik.game.sprites;

import cz.jzitnik.tui.Sprite;

import java.util.HashMap;

public class Cow extends Sprite<Cow.CowState> {
    public enum CowState {
        LEFT, RIGHT, LEFT_HURT, RIGHT_HURT
    }

    public Cow() {
        loadResources(new HashMap<>() {
            {
                put(CowState.LEFT, "mobs/cow/left.ans");
                put(CowState.RIGHT, "mobs/cow/right.ans");
                put(CowState.LEFT_HURT, "mobs/cow/lefthurt.ans");
                put(CowState.RIGHT_HURT, "mobs/cow/righthurt.ans");
            }
        }, CowState.class);
    }

    @Override
    public String getSprite() {
        return getSprite(CowState.RIGHT);
    }

    @Override
    public String getSprite(CowState key) {
        return super.getResource(key);
    }
}
