From 43864b6a635972c740be7fd80f4c57729d7fde70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kayyissa=20HA=C3=8FSSOUS?= Date: Sat, 8 Apr 2023 11:12:02 +0200 Subject: [PATCH] fix boutton retour qui efface pas tout --- app/src/main/java/com/example/mastermind/game/Saisie.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/example/mastermind/game/Saisie.java b/app/src/main/java/com/example/mastermind/game/Saisie.java index b28f0d3..5f3cc4c 100644 --- a/app/src/main/java/com/example/mastermind/game/Saisie.java +++ b/app/src/main/java/com/example/mastermind/game/Saisie.java @@ -48,10 +48,10 @@ public class Saisie { } public void removeSelection(Integer pionVide) { - if(this.sizeSelection<=4 && this.sizeSelection>0) { - this.selection.removeLast(); + if(this.sizeSelection>0) { + this.selection.remove(this.sizeSelection-1); this.selection.add(pionVide); - this.sizeSelection-=1; + this.sizeSelection--; } }