// Path: src/main/java/nl/tudelft/jpacman/ui/ScorePanel.java
// public interface ScoreFormatter {
// 
//     /**
//      * Format the score of a given player.
//      * @param player The player and its score
//      * @return Formatted score.
//      */
//     String format(Player player);
// }


import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import nl.tudelft.jpacman.game.Game;
import nl.tudelft.jpacman.ui.ScorePanel.ScoreFormatter;
    public PacManUiBuilder addButton(String caption, Action action) {
        assert caption != null;
        assert !caption.isEmpty();
        assert action != null;

        buttons.put(caption, action);
        return this;
    }

    /**
     * Adds a start and stop button to the UI. The actual actions for these
     * buttons will be added upon building the UI.
     *
     * @return The builder.
     */
    public PacManUiBuilder withDefaultButtons() {
        defaultButtons = true;
        buttons.put(START_CAPTION, null);
        buttons.put(STOP_CAPTION, null);
        return this;
    }

    /**
     * Provide formatter for the score.
     *
     * @param scoreFormatter
     *         The score formatter to be used.
     *
     * @return The builder.
     */
// Path: src/main/java/nl/tudelft/jpacman/ui/ScorePanel.java
// public interface ScoreFormatter {
// 
//     /**
//      * Format the score of a given player.
//      * @param player The player and its score
//      * @return Formatted score.
//      */
//     String format(Player player);
// }


// Path: src/main/java/nl/tudelft/jpacman/ui/PacManUiBuilder.java
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import nl.tudelft.jpacman.game.Game;
import nl.tudelft.jpacman.ui.ScorePanel.ScoreFormatter;

    public PacManUiBuilder addButton(String caption, Action action) {
        assert caption != null;
        assert !caption.isEmpty();
        assert action != null;

        buttons.put(caption, action);
        return this;
    }

    /**
     * Adds a start and stop button to the UI. The actual actions for these
     * buttons will be added upon building the UI.
     *
     * @return The builder.
     */
    public PacManUiBuilder withDefaultButtons() {
        defaultButtons = true;
        buttons.put(START_CAPTION, null);
        buttons.put(STOP_CAPTION, null);
        return this;
    }

    /**
     * Provide formatter for the score.
     *
     * @param scoreFormatter
     *         The score formatter to be used.
     *
     * @return The builder.
     */
    public PacManUiBuilder withScoreFormatter(ScoreFormatter scoreFormatter) {