package de.frajul.endlessroll.entities.tools;

import de.frajul.endlessroll.R;

/**
 * Created by Julian on 16.07.2016.
 */
public class ToolSlot {

    private ToolType toolType;
    private boolean locked;

    public ToolSlot(ToolType toolType, boolean locked) {
        this.toolType = toolType;
        this.locked = locked;
    }

    public ToolType getToolType() {
        return toolType;
    }

    public int getDrawable() {
        if (locked)
            return R.drawable.tools_button_locked;
        else if(toolType != null)
            return toolType.getButtonDrawable();
        else
            return R.drawable.tools_button_empty;
    }

    public void setToolType(ToolType toolType) {
        this.toolType = toolType;
    }

    public boolean isLocked() {
        return locked;
    }

    public void setLocked(boolean locked) {
        this.locked = locked;
    }
}
