From fc249ce672d5316da24c66092f064bda49c9c481 Mon Sep 17 00:00:00 2001 From: "jeremy.mouyon" Date: Tue, 7 May 2024 18:30:45 +0200 Subject: [PATCH 1/3] getboard --- Qwirkle/QwirkleClassLibrary/Game.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Qwirkle/QwirkleClassLibrary/Game.cs b/Qwirkle/QwirkleClassLibrary/Game.cs index d87d83f..1262316 100644 --- a/Qwirkle/QwirkleClassLibrary/Game.cs +++ b/Qwirkle/QwirkleClassLibrary/Game.cs @@ -59,6 +59,8 @@ namespace QwirkleClassLibrary return player; } + public Board GetBoard() { return board; } + public Board CreateBoard() { board = new Board(12, 12); From cdd26cb8f3cec97eee94a13a209bf3590f9bebd7 Mon Sep 17 00:00:00 2001 From: "jules.lascret" Date: Tue, 7 May 2024 18:34:05 +0200 Subject: [PATCH 2/3] made rows and columns properties public --- Qwirkle/QwirkleClassLibrary/Board.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Qwirkle/QwirkleClassLibrary/Board.cs b/Qwirkle/QwirkleClassLibrary/Board.cs index 52a0719..4614b52 100644 --- a/Qwirkle/QwirkleClassLibrary/Board.cs +++ b/Qwirkle/QwirkleClassLibrary/Board.cs @@ -13,8 +13,8 @@ namespace QwirkleClassLibrary public ReadOnlyCollection ReadCells => cells.AsReadOnly(); private readonly List cells = new(); - private int Rows { get; } - private int Columns { get; } + public int Rows { get; } + public int Columns { get; } public Board(int rows, int cols) { From faaf84c421257b39e86ae856153ceb336f88e8b1 Mon Sep 17 00:00:00 2001 From: "jules.lascret" Date: Tue, 7 May 2024 18:37:16 +0200 Subject: [PATCH 3/3] modif IRules.cs --- Qwirkle/QwirkleClassLibrary/IRules.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Qwirkle/QwirkleClassLibrary/IRules.cs b/Qwirkle/QwirkleClassLibrary/IRules.cs index 4d0456e..75d47a4 100644 --- a/Qwirkle/QwirkleClassLibrary/IRules.cs +++ b/Qwirkle/QwirkleClassLibrary/IRules.cs @@ -9,7 +9,11 @@ namespace QwirkleClassLibrary public interface IRules { Board CreateBoard(); - bool IsMoveCorrect(Tile t, Board b); + + TileBag CreateTileBag(int nbSet); + + bool IsMoveCorrect(Tile t, int x, int y, Board b); + bool IsGameOver(); } }