From cf6049a4fe6f85dc8883215208fe84806c1e9619 Mon Sep 17 00:00:00 2001 From: Mathis Date: Tue, 17 May 2022 10:09:48 +0200 Subject: [PATCH] UPDATE LaticeApplicationConsole --- .../application/LaticeApplicationConsole.java | 61 +++++++++++++++++-- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/src/main/java/latice/application/LaticeApplicationConsole.java b/src/main/java/latice/application/LaticeApplicationConsole.java index 0c981c6..eb17cd3 100644 --- a/src/main/java/latice/application/LaticeApplicationConsole.java +++ b/src/main/java/latice/application/LaticeApplicationConsole.java @@ -1,13 +1,13 @@ package latice.application; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; -import javafx.scene.image.Image; import latice.model.Color; import latice.model.Deck; +import latice.model.GameBoard; +import latice.model.Player; import latice.model.Rack; +import latice.model.Score; import latice.model.Shape; import latice.model.Tile; @@ -18,7 +18,7 @@ public class LaticeApplicationConsole { System.out.println("Hello Latice !"); - + /* for (Color color : Color.values()) { for (Shape shape : Shape.values()) { Tile tile = new Tile(color, shape); @@ -39,9 +39,58 @@ public class LaticeApplicationConsole { Rack rack = new Rack(deck); System.out.println("-----------------"); deck.displayListTile(); + + System.out.println("-----------------"); + GameBoard board = new GameBoard(); + board.displayGameBoard(); + System.out.println("-----------------"); + board.setGridBoard(" NV ", 4, 4); + board.displayGameBoard(); + System.out.println("-----------------"); + Score scorePlayer1 = new Score(); + Score scorePlayer2 = new Score(); + Player player1 = new Player("player1", scorePlayer1); + Player player2 = new Player("player2", scorePlayer2); + + System.out.println(player1.getName() + " a " + scorePlayer1.getScore() +" points"); + System.out.println(player2.getName() + " a " + scorePlayer2.getScore() +" points"); + + rack.displayRack(); + + */ + + for (Color color : Color.values()) { + for (Shape shape : Shape.values()) { + Tile tile = new Tile(color, shape); + System.out.println(color.getStringColor() + shape.getStringShape()+ ".png"); + + listOfTile.add(tile); + + } + } + + System.out.println("-----------------"); + System.out.println("Notre Deck :"); + Deck deck1 = new Deck(listOfTile); + Deck deck2 = new Deck(listOfTile); + deck1.displayListTile(); + System.out.println("-----------------"); + Rack rack1 = new Rack(deck1); + Rack rack2 = new Rack(deck2); + Score scorePlayer1 = new Score(); + Score scorePlayer2 = new Score(); + Player player1 = new Player("player1", scorePlayer1); + Player player2 = new Player("player2", scorePlayer2); + + System.out.println("-----------------"); + GameBoard board = new GameBoard(); + board.displayGameBoard(); + System.out.println("-----------------"); + + System.out.println(player1.getName() + " a " + scorePlayer1.getScore() +" points"); + System.out.println(player2.getName() + " a " + scorePlayer2.getScore() +" points"); + rack1.displayRack(); - - } }