From dba464f4ef3448478369850a4e67191f35830b64 Mon Sep 17 00:00:00 2001 From: mathi Date: Tue, 19 Apr 2022 23:19:52 +0200 Subject: [PATCH] UPDATE Tile and LaticeApplicationConsole classes --- .../application/LaticeApplicationConsole.java | 30 +++++++++++++++++++ src/main/java/latice/model/Tile.java | 12 ++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/java/latice/application/LaticeApplicationConsole.java b/src/main/java/latice/application/LaticeApplicationConsole.java index 9859a2a..5f94db2 100644 --- a/src/main/java/latice/application/LaticeApplicationConsole.java +++ b/src/main/java/latice/application/LaticeApplicationConsole.java @@ -1,8 +1,38 @@ package latice.application; +import java.util.ArrayList; + +import latice.model.Color; +import latice.model.Deck; +import latice.model.Shape; +import latice.model.Tile; + public class LaticeApplicationConsole { public static void main(String[] args) { + + ArrayList listOfTile = new ArrayList(); + System.out.println("Hello Latice !"); + + + for (Color color : Color.values()) { + for (Shape shape : Shape.values()) { + Tile tile = new Tile(color, shape); + System.out.println("tuile : couleur = " + tile.getColor() + " forme = " + tile.getShape()); + listOfTile.add(tile); + + } + } + + + System.out.println("Notre Deck :"); + Deck deck = new Deck(listOfTile); + deck.getListTile(); + System.out.println("-----------------"); + + + + } } diff --git a/src/main/java/latice/model/Tile.java b/src/main/java/latice/model/Tile.java index 7b06526..b2ff117 100644 --- a/src/main/java/latice/model/Tile.java +++ b/src/main/java/latice/model/Tile.java @@ -1,11 +1,19 @@ package latice.model; public class Tile { - Color color; - Shape shape; + private final Color color; + private final Shape shape; public Tile(Color color, Shape shape) { this.color = color; this.shape = shape; } + + public Color getColor() { + return this.color; + } + + public Shape getShape() { + return this.shape; + } }