package pathgame.gameplay.menu;

import pathgame.gameplay.Gamestates;

/**
 * A container for holding all options of the AfterScoreMenu
 *
 * @author julia
 */
public class AfterScoreMenu extends BaseMenu
{
    private final MenuButton[] options;

    /**
     * Contructor generating and initializing the AfterScoreMenu
     * 
     * @param id the id of the AfterScoreMenu
     * @param mainId the id to the MainMenu
     */
    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);
            }),
        };
    }

    /**
     * Returns the options of the AfterScoreMenu
     *
     * @return the options of the AfterScoreMenu
     */
    @Override
    public MenuButton[] getOptions()
    {
        return options;
    }

}
