From b0afa799aee0f28d7d03f4de2a82e244299411bd Mon Sep 17 00:00:00 2001 From: "jules.lascret" Date: Fri, 7 Jun 2024 18:23:39 +0200 Subject: [PATCH] Test issue #3, normally back at 0 code smells & +80% coverage --- Qwirkle/QwirkleClassLibrary/Games/Game.cs | 2 +- Qwirkle/TestBase/TestGame.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Qwirkle/QwirkleClassLibrary/Games/Game.cs b/Qwirkle/QwirkleClassLibrary/Games/Game.cs index caca023..ccd734b 100644 --- a/Qwirkle/QwirkleClassLibrary/Games/Game.cs +++ b/Qwirkle/QwirkleClassLibrary/Games/Game.cs @@ -586,7 +586,7 @@ namespace QwirkleClassLibrary.Games /// /// /// - public bool CheckWrongCompletedLines(int x, int y, int dx, int dy, Board b, ref List checkdoubles) + public static bool CheckWrongCompletedLines(int x, int y, int dx, int dy, Board b, ref List checkdoubles) { int nbTiles = 1; diff --git a/Qwirkle/TestBase/TestGame.cs b/Qwirkle/TestBase/TestGame.cs index e09f068..ff2cfac 100644 --- a/Qwirkle/TestBase/TestGame.cs +++ b/Qwirkle/TestBase/TestGame.cs @@ -423,7 +423,6 @@ public class TestGame [Fact] public void Test_CheckWrongCompletedLines() { - var game = new Game(); var board = new Board(17, 14); var checkDoubles = new List(); int x = 4, y = 1, dx = 1, dy = 0; @@ -435,7 +434,7 @@ public class TestGame board.AddTileInCell(6, 1, new Tile(Shape.Shuriken, Color.Red)); board.AddTileInCell(7, 1, new Tile(Shape.Rhombus, Color.Red)); - bool result = game.CheckWrongCompletedLines(x, y, dx, dy, board, ref checkDoubles); + bool result = Game.CheckWrongCompletedLines(x, y, dx, dy, board, ref checkDoubles); Assert.False(result); }