Exemplo n.º 1
0
        public void SyncPlayerPiecesState(Board i_GameBoard)
        {
            bool jumpFound   = false;
            bool isFirstJump = true;
            bool SweepBasicStepsNeccessary = false;

            foreach (Piece PlayerPiece in r_PlayerPieces)
            {
                checkIfPromoteToKing(PlayerPiece, i_GameBoard);
                PlayerPiece.UpdatePossibleMovesPool(i_GameBoard, ref jumpFound);
                if (jumpFound && isFirstJump)
                {
                    isFirstJump = false;
                    SweepBasicStepsNeccessary = true;
                }
            }

            if (SweepBasicStepsNeccessary)
            {
                this.sweepBasicStepsFromPieces();
            }
        }