public void IsNotPlayableSquare_DiffSquares_DiffResults() { Assert.IsTrue(CheckersSquare.IsNotPlayableSquare(0, 0)); Assert.IsFalse(CheckersSquare.IsNotPlayableSquare(0, 1)); Assert.IsTrue(CheckersSquare.IsNotPlayableSquare(0, 2)); Assert.IsFalse(CheckersSquare.IsNotPlayableSquare(1, 0)); Assert.IsTrue(CheckersSquare.IsNotPlayableSquare(1, 1)); Assert.IsFalse(CheckersSquare.IsNotPlayableSquare(1, 2)); }
public void Contructor_ValidSize_FreeAndNotPlayableSquaresOk() { var target = new CheckersBoard(8); Assert.AreEqual(8, target.Size); for (int c = 0; c < 8; c++) { for (int r = 0; r < 8; r++) { var notPlayable = CheckersSquare.IsNotPlayableSquare(c, r); var actual = target.GetSquare(c, r).State; if (notPlayable) { Assert.AreEqual(CheckersSquareState.NotPlayable, actual); } else { Assert.AreNotEqual(CheckersSquareState.NotPlayable, actual); } } } }