@Override
public void submitScore() throws EmptyPlayerNameException {
Integer score = this.model.getStatistics().getScore();
String name = this.subScore.getTextField().getText();
if (name.trim().isEmpty()) {
throw new EmptyPlayerNameException();
}
if (name.length() >= MAX_NAME_LENGTH) {
name = name.substring(0, MAX_NAME_LENGTH);
}
HighScore.getHighScore().addScore(name, score);