package pathgame.gameplay;

/**
 * A container for the gamestate
 *
 * @author julia
 */
public class Gamestate
{
    private Gamestates state = Gamestates.MENU;

    /**
     * Sets the current gamestate
     *
     * @param state the desired gamestate
     */
    public void setState(Gamestates state)
    {
        this.state = state;
    }

    /**
     * Returns the current gamestate
     *
     * @return the current game state
     */
    public Gamestates getState()
    {
        return state;
    }

    /**
     * Returns if current gamestate is same as gamestate from parameter
     *
     * @param gamestate the gamestate that has to be checked if it is the
     * current
     * @return if current gamestate is same as gamestate from parameter
     */
    public boolean is(Gamestates gamestate)
    {
        return state == gamestate;
    }
}
