public void ShouldGetNextMoveAsBlackWithDepthOne() { var connector = new UCIConnector(_setting); connector.Connect(); var move1 = connector.GetNextMove("", 1); var move2 = connector.GetNextMove("e2e4 d7d5", 1); connector.Disconnect(); StringAssert.IsMatch(MOVE_REGEX_PATTERN, move1); StringAssert.IsMatch(MOVE_REGEX_PATTERN, move2); }
public void ShouldThrowNotConnectedException() { var connector = new UCIConnector(_setting); Assert.IsFalse(connector.IsConnected); Assert.Throws <UCIConnectionException>(() => connector.GetNextMove("d2d4", 5)); Assert.Throws <UCIConnectionException>(() => connector.ConfigureEngine()); Assert.Throws <UCIConnectionException>(() => connector.StartGame()); }
public void ShouldGetNextMoveAsWhiteWithDepthOne() { var connector = new UCIConnector(_setting); connector.Connect(); var move = connector.GetNextMove("e2e4", 1); connector.Disconnect(); StringAssert.IsMatch(MOVE_REGEX_PATTERN, move); }