package pathgame.gameplay.menu;

import pathgame.gameplay.Gamestates;

public class AfterScoreMenu extends BaseMenu
{

    private final MenuButton[] options;

    public AfterScoreMenu(int id, int mainId)
    {
        super(id);

        options = new MenuButton[]
        {
            new MenuButton("Next Level", (gamestate, level) ->
            {
                level.nextLevel();
                level.getPlayer().setAbilities(level.getPlayer().getAbilities());
                gamestate.setState(Gamestates.GAMEPLAY);
                level.setShowAfterScore(false);
            }),
            new MenuButton("Retry", (gamestate, level) ->
            {
                level.reset();
                level.getPlayer().setAbilities(level.getPlayer().getAbilities());
                gamestate.setState(Gamestates.GAMEPLAY);
                level.setShowAfterScore(false);
            }),
            new MenuButton("Main Menu", (gamestate, level) ->
            {
                level.setShowAfterScore(false);
                setReturnId(mainId);
            }),
        };
    }

    @Override
    public MenuButton[] getOptions()
    {
        return options;
    }

}
