Game/GameManager.cs
/// <summary>
/// Pre-compute the pieces that are keeping the king safe
/// </summary>
/// <param name="friendlyPieces"></param>
/// <param name="enemyPieces"></param>
Pre-compute the pieces that are keeping the king safe
Pre - compute the pieces that are keeping the king safe
private void UpdateBlockingPieces(List<Piece> friendlyPieces, List<Piece> enemyPieces)
        {
            foreach (Piece piece in friendlyPieces)
            {
                piece.Blocking.Clear();
            }
            foreach (Piece piece in enemyPieces)
            {
                piece.UpdateAvailableCoords(Board.Tiles);
            }
        }
private void UpdateBlockingPieces ( List < Piece > friendlyPieces , List < Piece > enemyPieces ) { foreach ( Piece piece in friendlyPieces ) { piece . Blocking . Clear ( ) ; } foreach ( Piece piece in enemyPieces ) { piece . UpdateAvailableCoords ( Board . Tiles ) ; } }
Pre-compute the pieces that are keeping the king safe
Pre - compute the pieces that are keeping the king safe
friendlyPieces
List<Piece>
None
enemyPieces
List<Piece>
None