Fixed ai naming

This commit is contained in:
lieght
2025-09-17 17:35:00 +02:00
parent 24f2034170
commit 38ea15738c
2 changed files with 8 additions and 7 deletions

5
.idea/workspace.xml generated
View File

@@ -5,7 +5,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="997b32da-b4d4-48ac-ab51-52d65f364f81" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/src/main/java/org/toop/eventbus/Events.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/toop/eventbus/Events.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/org/toop/ConsoleGui.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/toop/ConsoleGui.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -82,7 +83,7 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1758117514311</updated>
<workItem from="1758117515668" duration="4457000" />
<workItem from="1758117515668" duration="5345000" />
</task>
<servers />
</component>

View File

@@ -62,7 +62,7 @@ public class ConsoleGui {
String name = scanner.nextLine();
player1 = name;
ai2 = player2 = "AI #" + random.nextInt();
ai2 = player2 = "AI#" + random.nextInt();
break;
}
@@ -72,7 +72,7 @@ public class ConsoleGui {
System.out.print("Enter your name: ");
String name = scanner.nextLine();
ai1 = player1 = "AI #" + random.nextInt();
ai1 = player1 = "AI#" + random.nextInt();
player2 = name;
break;
@@ -80,8 +80,8 @@ public class ConsoleGui {
// ai vs ai
case 4: {
ai1 = player1 = "AI #" + random.nextInt();
ai2 = player2 = "AI 2" + random.nextInt();
ai1 = player1 = "AI#" + random.nextInt();
ai2 = player2 = "AI2" + random.nextInt();
break;
}
@@ -184,7 +184,7 @@ public class ConsoleGui {
GlobalEventBus.post(new Events.ServerEvents.SendCommand(
connectionId,
"gameid " + ticTacToeGameId, current.name(), "MOVE", String.valueOf(move)
"gameid " + ticTacToeGameId, "player " + current.name(), "MOVE", String.valueOf(move)
));
if (!keepRunning) {