From 30623929e09255ab68832734e318c9a938748df1 Mon Sep 17 00:00:00 2001 From: Mathis Date: Sat, 4 Jun 2022 18:54:52 +0200 Subject: [PATCH] bugfix method updateRack in Rack --- src/main/java/latice/model/console/Rack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/latice/model/console/Rack.java b/src/main/java/latice/model/console/Rack.java index bd0db80..2c01ed4 100644 --- a/src/main/java/latice/model/console/Rack.java +++ b/src/main/java/latice/model/console/Rack.java @@ -52,8 +52,8 @@ public class Rack { public void updateRack() { Tile tile; - - for (int i = 0; i < 5-(this.listRackTile.size()-1) ; i++) { + System.out.println("nomdre de tuile dans le rack : " + this.listRackTile.size()); + for (int i = this.listRackTile.size(); i < 5 ; i++) { int index = (int)(Math.random()*( ((this.deck.getListTile()).size()-1)-0+1)+0); //(int)(Math.random()*(max-min+1)+min); tile = (this.deck.getListTile()).get(index);