package cz.jzitnik.game.sprites;

import cz.jzitnik.tui.ResourceLoader;
import cz.jzitnik.tui.Sprite;

import java.util.HashMap;

public class OakDoor extends Sprite<OakDoor.OakDoorState> {
    public enum OakDoorState {
        TOP, BOTTOM, TOPCLOSED, BOTTOMCLOSED
    }

    public OakDoor() {
        loadResources(new HashMap<>() {
            {
                put(OakDoorState.TOP, "oak_door/top.ans");
                put(OakDoorState.BOTTOM, "oak_door/bottom.ans");
                put(OakDoorState.TOPCLOSED, "oak_door/topclosed.ans");
                put(OakDoorState.BOTTOMCLOSED, "oak_door/bottomclosed.ans");
            }
        }, OakDoorState.class);
    }

    public String getSprite() {
        return ResourceLoader.loadResource("oak_door/bottomclosed.ans");
    }

    public String getSprite(OakDoorState e) {
        return getResource(e);
    }
}
