Test issue #3, normally back at 0 code smells & +80% coverage
continuous-integration/drone/push Build is passing Details

master
Jules LASCRET 11 months ago
parent f0a3185b4b
commit b0afa799ae

@ -586,7 +586,7 @@ namespace QwirkleClassLibrary.Games
/// <param name="b"></param> /// <param name="b"></param>
/// <param name="checkdoubles"></param> /// <param name="checkdoubles"></param>
/// <returns></returns> /// <returns></returns>
public bool CheckWrongCompletedLines(int x, int y, int dx, int dy, Board b, ref List<Tile> checkdoubles) public static bool CheckWrongCompletedLines(int x, int y, int dx, int dy, Board b, ref List<Tile> checkdoubles)
{ {
int nbTiles = 1; int nbTiles = 1;

@ -423,7 +423,6 @@ public class TestGame
[Fact] [Fact]
public void Test_CheckWrongCompletedLines() public void Test_CheckWrongCompletedLines()
{ {
var game = new Game();
var board = new Board(17, 14); var board = new Board(17, 14);
var checkDoubles = new List<Tile>(); var checkDoubles = new List<Tile>();
int x = 4, y = 1, dx = 1, dy = 0; 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(6, 1, new Tile(Shape.Shuriken, Color.Red));
board.AddTileInCell(7, 1, new Tile(Shape.Rhombus, 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); Assert.False(result);
} }

Loading…
Cancel
Save