package pathgame.gameplay.menu;

import java.util.function.Consumer;
import pathgame.gameplay.Gamestate;

public class MenuOption
{
    private final String name;
    private final Consumer<Gamestate> r;
    
    public MenuOption(String name, Consumer<Gamestate> r)
    {
        this.name = name;
        this.r = r;
    }

    public String getName()
    {
        return name;
    }
    
    public void run(Gamestate gamestate)
    {
        r.accept(gamestate);
    }
}
