public void CheckIfListContains3StraightInARow() { var moveList = new MoveList(); var winChecker = new WinChecker(); moveList.AddMove(new Move(1, 2)); moveList.AddMove(new Move(2, 2)); moveList.AddMove(new Move(1, 1)); moveList.AddMove(new Move(1, 3)); var listOfX = winChecker.AddXCoordinatesIntoSortedList(moveList.Moves); var result = winChecker.ContainsStraightLine(listOfX); Assert.True(result); }
public void PutXCoordinatesIntoASortedIntegerList() { var moveList = new MoveList(); var winChecker = new WinChecker(); moveList.AddMove(new Move(1, 2)); moveList.AddMove(new Move(2, 2)); moveList.AddMove(new Move(1, 1)); moveList.AddMove(new Move(1, 3)); var result = winChecker.AddXCoordinatesIntoSortedList(moveList.Moves); var expectedList = new List <int> { 1, 1, 1, 2 }; Assert.Equal(expectedList, result); }