Game/Pieces/Piece.cs
/// <summary>
/// Handles targeting king for pieces that have line of sight movement
/// </summary>
/// <param name="board"></param>
/// <param name="op"></param>
/// <param name="corner"></param>
/// <param name="rotation"></param>
Handles targeting king for pieces that have line of sight movement
Handles targeting king for pieces that have line of sight movement
protected void HandleTargetKing(Tile[] board, Func<int, int, int> op, int corner, int rotation)
        {
            if (board[op((int) Coords, rotation)].Piece.EPiece != EPiece.King)
                return;
            ((King) board[op((int) Coords, rotation)].Piece).Checks.AddRange(GetAttackLine(board, op, rotation, corner));
        }
protected void HandleTargetKing ( Tile [ ] board , Func < int , int , int > op , int corner , int rotation ) { if ( board [ op ( ( int ) Coords , rotation ) ] . Piece . EPiece != EPiece . King ) return ; ( ( King ) board [ op ( ( int ) Coords , rotation ) ] . Piece ) . Checks . AddRange ( GetAttackLine ( board , op , rotation , corner ) ) ; }
Handles targeting king for pieces that have line of sight movement
Handles targeting king for pieces that have line of sight movement
board
Tile[]
None
op
Func<int, int, int>
None
corner
int
None
rotation
int
None