public void TakeTurn_EmptyBoard_PlaysInColumn0Row0() { // arrange BasicBot player = new BasicBot(); FakeBoard emptyBoard = new FakeBoard(); // act var positionPlayed = player.TakeTurn(emptyBoard); // assert Assert.That(positionPlayed.Column, Is.EqualTo(0)); Assert.That(positionPlayed.Row, Is.EqualTo(0)); }
public void TakeTurn_Column0Row0AlreadyHasPiece_PlaysInColumn0Row0Anyway() { // arrange BasicBot player = new BasicBot(); FakeBoard partiallyFullBoard = new FakeBoard(); partiallyFullBoard.SetToken(0, 0, PlayerToken.Opponent); // act var positionPlayed = player.TakeTurn(partiallyFullBoard); // assert Assert.That(positionPlayed.Column, Is.EqualTo(0)); Assert.That(positionPlayed.Row, Is.EqualTo(0)); }
public void TakeTurn_BoardHasAFewPieces_PlaysInColumn0Row0() { // arrange BasicBot player = new BasicBot(); FakeBoard partiallyFullBoard = new FakeBoard(); partiallyFullBoard.SetBoard( new PlayerToken[, ] { { PlayerToken.Me, PlayerToken.Me, PlayerToken.None }, // Row 0, { PlayerToken.None, PlayerToken.None, PlayerToken.None }, // Row 1, { PlayerToken.None, PlayerToken.Opponent, PlayerToken.Opponent } }); // Row 2 // Column 0, Column 1, Column 2 // act var positionPlayed = player.TakeTurn(partiallyFullBoard); // assert Assert.That(positionPlayed.Column, Is.EqualTo(0)); Assert.That(positionPlayed.Row, Is.EqualTo(0)); }