Exemplo n.º 1
0
    void OnMove(bool whiteMoved, ushort move)
    {
        if (relinquishUserScrollbarControlNextMove)
        {
            relinquishUserScrollbarControlNextMove = false;
            userControllingScrollbar = false;
        }

        if (whiteMoved)
        {
            fullGamePGN              += (Board.GetFullMoveCount() + 1) + ". " + PGNReader.NotationFromMove(move);
            moveNumberUI.text        += (Board.GetFullMoveCount() + 1) + ". \n";
            moveNotationWhiteUI.text += PGNReader.NotationFromMove(move) + "\n";
        }
        else
        {
            fullGamePGN += " " + PGNReader.NotationFromMove(move) + " ";
            moveNotationBlackUI.text += PGNReader.NotationFromMove(move) + "\n";

            if (Board.GetFullMoveCount() > 14)
            {
                int size = -30 * (Board.GetFullMoveCount() - 14);
                contentBounds.offsetMin = new Vector2(contentBounds.offsetMin.x, size);
                contentBounds.offsetMax = new Vector2(contentBounds.offsetMax.x, 0);
            }
        }
    }
Exemplo n.º 2
0
 void OnMoveMade(bool whiteMoved, ushort move)
 {
     if (whiteMoved)
     {
         moveInputBlack.text = "...";
         input.Freeze();
         moveInputWhite.text = PGNReader.NotationFromMove(move);
     }
     else
     {
         input.UnFreeze();
         input.Clear();
         moveInputBlack.text = PGNReader.NotationFromMove(move);
     }
 }