From 529ac87dcd2bf7a2c1f550909b2dc303d37f9ccc Mon Sep 17 00:00:00 2001 From: "jeremy.mouyon" Date: Sun, 26 May 2024 11:13:10 +0200 Subject: [PATCH] my bad, sorry mate --- Qwirkle/QwirkleClassLibrary/Games/Game.cs | 2 +- Qwirkle/QwirkleConsoleApp/Program.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Qwirkle/QwirkleClassLibrary/Games/Game.cs b/Qwirkle/QwirkleClassLibrary/Games/Game.cs index 23464c5..32ecfc2 100644 --- a/Qwirkle/QwirkleClassLibrary/Games/Game.cs +++ b/Qwirkle/QwirkleClassLibrary/Games/Game.cs @@ -735,7 +735,7 @@ namespace QwirkleClassLibrary.Games { List playerTilesBagPos = CheckTilesBag(); - if (playerTilesBagPos.Count != 0 && !CheckPlacementPossibilities(playerTilesBagPos) || playerTilesBagPos.Count == 0 && players[GetPlayingPlayerPosition()].Tiles.Count==0) + if (playerTilesBagPos.Count != 0 && !CheckPlacementPossibilities(playerTilesBagPos) || bag!.TilesBag.Count == 0 && players[GetPlayingPlayerPosition()].Tiles.Count==0) { OnEndOfGame(new EndOfGameNotifiedEventArgs(player)); GameRunning = false; diff --git a/Qwirkle/QwirkleConsoleApp/Program.cs b/Qwirkle/QwirkleConsoleApp/Program.cs index 989895b..82a7639 100644 --- a/Qwirkle/QwirkleConsoleApp/Program.cs +++ b/Qwirkle/QwirkleConsoleApp/Program.cs @@ -205,7 +205,7 @@ static void MenuSwitch(Game game) enter = 3; break; case 3: - WriteLine("Your score on this turn : " + game.GetPlayerScore(game.GetPlayingPlayer(), game.CellsUsed, game.GetBoard())); + WriteLine("Your score on this turn : " + game.GetPlayerScore(game.GetPlayingPlayer(), game.CellsUsed, game.Board)); game.EmptyCellUsed(); game.DrawTiles(game.GetPlayingPlayer()); game.CheckGameOver(game.GetPlayingPlayer()); @@ -216,7 +216,7 @@ static void MenuSwitch(Game game) static void ShowBoard(Game game) { - Board board = game.GetBoard(); + Board board = game.Board; for (int i = 0; i < board.Rows; i++) {