From 2d7c3c2f62e40342e9cc6f2767c47c16d3be8a97 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 16 Dec 2014 12:47:09 +0100 Subject: [PATCH] Player now has to enter a name other than "" before submitting the Highscore. --- .../spacescooter/screen/EnterHighscoreScreen.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/de/teamteamteam/spacescooter/screen/EnterHighscoreScreen.java b/src/de/teamteamteam/spacescooter/screen/EnterHighscoreScreen.java index 5ecaa99..74ff0d4 100644 --- a/src/de/teamteamteam/spacescooter/screen/EnterHighscoreScreen.java +++ b/src/de/teamteamteam/spacescooter/screen/EnterHighscoreScreen.java @@ -167,8 +167,11 @@ public class EnterHighscoreScreen extends Screen { eingabeName += letters[i].getText(); } } - Highscore.newScore(this.score, eingabeName); - animationStatus = 1; + //Make sure the player entered a name. + if(eingabeName.equals("") == false) { + Highscore.newScore(this.score, eingabeName); + animationStatus = 1; + } }else{ if(this.enteredLetter < 10) this.searchForChar(); }