public void HalfMoveClock() { FENString.ParseString("RNBKQBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w KQ - 7 0"); Assert.IsTrue(FENString.isValid); Assert.IsTrue(condition: FENString.HalfMoveClock == 7); }
public void FullMoveNumber() { FENString.ParseString("RNBKQBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w KQ - 7 300"); Assert.IsTrue(FENString.isValid); Assert.IsTrue(condition: FENString.FullMoveNumber == 300); }
public void WhiteKingSideCastle() { FENString.ParseString("RNBKQBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w K - 0 0"); Assert.IsTrue(FENString.isValid); Assert.IsTrue(FENString.WhiteCanCastleKingsSide); Assert.IsFalse(FENString.WhiteCanCastleQueenSide); Assert.IsFalse(FENString.BlackCanCastleKingsSide); Assert.IsFalse(FENString.BlackCanCastleQueenSide); }
void Start() { con = GameObject.FindObjectOfType <UCIConsole>(); con.STDIN = "Start Game <Board.cs>"; con.STDIN = myGUID.ToString(); FENString.ParseString("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq c6 0 2"); captured = yourPieces; if (FENString.isValid) { _board = FENString.Layout; con.STDIN = ("FEN " + FENString.RawString); // Moves.Add(FENString); _positionMatrix = BuildPositionMatrix(); } SetupBoard(_board); Upated = true; }
public void isWhiteMove() { FENString.ParseString("RNBKQBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w KQ - 7 0"); Assert.IsTrue(FENString.isValid); Assert.IsTrue(FENString.isWhiteMove); }
public void TooManySpaces() { FENString.ParseString("RNBKQBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w KQqk - 0 0"); Assert.IsFalse(FENString.isValid); }
public void OnePieceShort() { FENString.ParseString("RNBKQBNR/PPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w KQqk - 0 0"); Assert.IsFalse(FENString.isValid); }
public void OneEmptyTooMany() { FENString.ParseString("RNBKQBNR/PPPPPPP/8/8/8/9/pppppppp/rnbqkbnr w KQqk - 0 0"); Assert.IsFalse(FENString.isValid); }
public void Move3WikiPedia() { FENString.ParseString("rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6 0 2"); Assert.IsTrue(FENString.isValid); }
public void Move1WikiPedia() { FENString.ParseString("rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1"); Assert.IsTrue(FENString.isValid); }