Skip to content
Snippets Groups Projects
Commit 5c3f87b8 authored by Josua Oppermann's avatar Josua Oppermann
Browse files

Random fix

parent addd4366
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment