public void TestMoveCounter() { GameField gamefield = new GameField(4); int successMoveCount = 0; if (gamefield.MakeMove(12)) { successMoveCount++; } if (gamefield.MakeMove(1)) { successMoveCount++; } Assert.AreEqual(successMoveCount, gamefield.MoveCounter); }
/// <summary> ///Initializes a new instance of the <see cref="GameEngine"/> class. Sets base parameters for new game, scoreboard and field. /// </summary> public GameEngine() { this.scoreBoard = new ScoreBoard(); this.field = new GameField(Size); renderer = new GameRenderer(); }
public void TestToStringSecondTest() { GameField gamefield = new GameField(4); Assert.IsTrue(gamefield.ToString().Contains("|")); }
public void TestToString() { GameField gamefield = new GameField(4); Assert.IsTrue(gamefield.ToString().StartsWith(" -------------")); }
public void TestMoveCounterStartValue() { GameField gamefield = new GameField(4); Assert.AreEqual(0, gamefield.MoveCounter); }
public void TestIsCurrentMatrixArranged() { GameField gamefield = new GameField(4); Assert.IsFalse(gamefield.IsCurrentMatrixArranged()); }
public void InitializeFieldWithNegativeSize() { GameField gamefield = new GameField(-2); }
/// <summary> /// Initializes a new instance of the <see cref="GameEngine"/> class. Sets base parameters for new game, scoreboard and field. /// </summary> public GameEngine() { this.scoreBoard = new ScoreBoard(); this.field = new GameField(Size); this.renderer = new GameRenderer(); }