From f0522b9be3edc0e3d0227170169fcc7eba12e362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kayyissa=20HA=C3=8FSSOUS?= Date: Mon, 3 Apr 2023 22:49:29 +0200 Subject: [PATCH] c'est fix en fait --- .../java/com/example/mastermind/game/GameView.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/example/mastermind/game/GameView.java b/app/src/main/java/com/example/mastermind/game/GameView.java index 543a4e5..c2e9faa 100644 --- a/app/src/main/java/com/example/mastermind/game/GameView.java +++ b/app/src/main/java/com/example/mastermind/game/GameView.java @@ -32,13 +32,16 @@ public class GameView extends View { protected void onDraw(Canvas canvas){ super.onDraw(canvas); this.setBackgroundColor(this.getResources().getColor(R.color.grey)); - LinkedList grille = (LinkedList) this.grille.getSoumissions(); - System.out.println("test?"); + LinkedList grille = new LinkedList(); + grille.addAll(this.grille.getSoumissions()); + System.out.println(grille); + System.out.println(this.grille.getSoumissions()); for (int y=0; y<10;y++) { for (int x=0;x<4;x++) { - /*this.circle.setColor(grille.pop()); - canvas.drawCircle(x*10,y*10, 50, this.circle); - System.out.println("rond grille");*/ + this.circle.setColor(grille.pop()); + //TODO: coordonnées propres + canvas.drawCircle((x*130+350),(y*130+100), 60, this.circle); + System.out.println("rond grille"); } } }