From 5c3f87b867b7bc633b068c148fa174275036457a Mon Sep 17 00:00:00 2001
From: Josua Oppermann <josua.oppermann@gmail.com>
Date: Thu, 9 Jan 2025 16:33:12 +0100
Subject: [PATCH] Random fix

---
 GameUI.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/GameUI.java b/GameUI.java
index 5462d34..058350c 100644
--- a/GameUI.java
+++ b/GameUI.java
@@ -137,8 +137,10 @@ public class GameUI extends Application{
         board.tiles[index].setOwner(board.currentPlayer);
        
         //replace symbols with images
-        String imageSymbols = board.currentPlayer == 0 ? getClass().getResource("/textures/1_" + rnd.nextInt(3) + ".png").toExternalForm() :
-                                                         getClass().getResource("/textures/0_" + rnd.nextInt(3) + ".png").toExternalForm();
+        int i = rnd.nextInt(3);
+        String imageSymbols = board.currentPlayer == 0 ? getClass().getResource("/textures/1_" + i + ".png").toExternalForm() :
+                                                         getClass().getResource("/textures/0_" + i + ".png").toExternalForm();
+        System.out.println(i);
         Image image = new Image(""+ imageSymbols);
         ImageView imageView = new ImageView(image);
 
-- 
GitLab