public void GameFieldCount() { Spielfeld s = new Spielfeld(); s.GetBoard(); Assert.IsTrue(s.GetBoard().Length == 9); }
public void TurnInvalid() { Spielfeld s = new Spielfeld(); s.GetBoard(); s.Turn(new Point(0, 0)); Assert.IsTrue(s.Turn(new Point(0, 0)) == TurnResult.Invalid); }
public void TurnToWinHorizontalRow2() { Spielfeld s = new Spielfeld(); s.GetBoard(); s.Turn(new Point(2, 0)); s.Turn(new Point(0, 0)); s.Turn(new Point(2, 1)); s.Turn(new Point(0, 1)); Assert.IsTrue(s.Turn(new Point(2, 2)) == TurnResult.Win); }
public void TurnToWinDiagonal1() { Spielfeld s = new Spielfeld(); s.GetBoard(); s.Turn(new Point(0, 2)); s.Turn(new Point(0, 1)); s.Turn(new Point(1, 1)); s.Turn(new Point(2, 1)); Assert.IsTrue(s.Turn(new Point(2, 0)) == TurnResult.Win); }
public void TurnToWinVerticalCol2() { Spielfeld s = new Spielfeld(); s.GetBoard(); s.Turn(new Point(0, 2)); s.Turn(new Point(0, 1)); s.Turn(new Point(1, 2)); s.Turn(new Point(1, 1)); Assert.IsTrue(s.Turn(new Point(2, 2)) == TurnResult.Win); }
public void TurnTie() { Spielfeld s = new Spielfeld(); s.GetBoard(); s.Turn(new Point(0, 0)); s.Turn(new Point(1, 0)); s.Turn(new Point(2, 0)); s.Turn(new Point(1, 1)); s.Turn(new Point(0, 1)); s.Turn(new Point(0, 2)); s.Turn(new Point(2, 1)); s.Turn(new Point(2, 2)); Assert.IsTrue(s.Turn(new Point(1, 2)) == TurnResult.Tie); }