Пример #1
0
    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);
    }
Пример #2
0
    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);
    }
Пример #3
0
    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);
    }
Пример #4
0
    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;
    }
Пример #5
0
 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);
 }
Пример #6
0
 public void TooManySpaces()
 {
     FENString.ParseString("RNBKQBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr  w KQqk - 0 0");
     Assert.IsFalse(FENString.isValid);
 }
Пример #7
0
 public void OnePieceShort()
 {
     FENString.ParseString("RNBKQBNR/PPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w KQqk - 0 0");
     Assert.IsFalse(FENString.isValid);
 }
Пример #8
0
 public void OneEmptyTooMany()
 {
     FENString.ParseString("RNBKQBNR/PPPPPPP/8/8/8/9/pppppppp/rnbqkbnr w KQqk - 0 0");
     Assert.IsFalse(FENString.isValid);
 }
Пример #9
0
    public void Move3WikiPedia()
    {
        FENString.ParseString("rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6 0 2");

        Assert.IsTrue(FENString.isValid);
    }
Пример #10
0
    public void Move1WikiPedia()
    {
        FENString.ParseString("rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1");

        Assert.IsTrue(FENString.isValid);
    }