fixed wrong game start message

This commit is contained in:
Asecave
2022-03-25 20:44:28 +01:00
parent a78fac1baf
commit 92d4f15e75

View File

@@ -148,8 +148,6 @@ public class Game {
String args = msg.substring(5); String args = msg.substring(5);
System.out.println(wordle);
if (args.length() == 5) { if (args.length() == 5) {
databaseConnector.executeStatement("SELECT word FROM words WHERE word LIKE '" + args + "'"); databaseConnector.executeStatement("SELECT word FROM words WHERE word LIKE '" + args + "'");
@@ -300,7 +298,7 @@ public class Game {
databaseConnector.executeStatement("SELECT * FROM Spielstand WHERE Username = '" + user.getName() + "'"); databaseConnector.executeStatement("SELECT * FROM Spielstand WHERE Username = '" + user.getName() + "'");
QueryResult result = databaseConnector.getCurrentQueryResult(); QueryResult result = databaseConnector.getCurrentQueryResult();
if (result != null && result.getData().length > 0) { if (result != null && result.getData().length > 0 && !result.getData()[0][0].equals("null")) {
boolean foundEnd = false; boolean foundEnd = false;
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
if (!result.getData()[0][i].equals("null")) { if (!result.getData()[0][i].equals("null")) {