public static ChessPieceMoveDefinition RookStandardRankMoveDefinition(ChessPieceColor orientation) { if (rookStandardRankMoveDefinition == default(ChessPieceMoveDefinition)) { rookStandardRankMoveDefinition = new ChessPieceMoveDefinition(0, 8, 8, ChessPieceMoveDirections.PositiveRank | ChessPieceMoveDirections.NegativeRank); } return(rookStandardRankMoveDefinition); }
public static ChessPieceMoveDefinition KnightStandardRankMoveDefinition(ChessPieceColor orientation) { if (knightStandardRankMoveDefinition == default(ChessPieceMoveDefinition)) { knightStandardRankMoveDefinition = new ChessPieceMoveDefinition(1, 2, 1, ChessPieceMoveDirections.AscendingDiagonal | ChessPieceMoveDirections.DescendingDiagonal); } return(knightStandardRankMoveDefinition); }
public static ChessPieceMoveDefinition QueenStandardDiagonalMoveDefinition(ChessPieceColor orientation) { if (queenStandardDiagonalMoveDefinition == default(ChessPieceMoveDefinition)) { queenStandardDiagonalMoveDefinition = new ChessPieceMoveDefinition(1, 1, 8, ChessPieceMoveDirections.AscendingDiagonal | ChessPieceMoveDirections.DescendingDiagonal); } return(queenStandardDiagonalMoveDefinition); }
public static ChessPieceMoveDefinition QueenStandardRankMoveDefinition(ChessPieceColor orientation) { if (queenStandardRankMoveDefinition == default(ChessPieceMoveDefinition)) { queenStandardRankMoveDefinition = new ChessPieceMoveDefinition(0, 1, 8, ChessPieceMoveDirections.Rank); } return(queenStandardRankMoveDefinition); }
public static ChessPieceMoveDefinition QueenStandardFileMoveDefinition(ChessPieceColor orientation) { if (queenStandardFileMoveDefinition == default(ChessPieceMoveDefinition)) { queenStandardFileMoveDefinition = new ChessPieceMoveDefinition(1, 0, 8, ChessPieceMoveDirections.File); } return(queenStandardFileMoveDefinition); }
public static ChessPieceMoveDefinition KingStandardRankMoveDefinition(ChessPieceColor orientation) { if (kingStandardRankMoveDefinition == default(ChessPieceMoveDefinition)) { kingStandardRankMoveDefinition = new ChessPieceMoveDefinition(0, 1, 1, ChessPieceMoveDirections.Rank); } return(kingStandardRankMoveDefinition); }
public static ChessPieceMoveDefinition BishopStandardRankMoveDefinition(ChessPieceColor orientation) { if (bishopStandardRankMoveDefinition == default(ChessPieceMoveDefinition)) { bishopStandardRankMoveDefinition = new ChessPieceMoveDefinition(1, 1, 8, ChessPieceMoveDirections.AscendingDiagonal | ChessPieceMoveDirections.DescendingDiagonal); } return(bishopStandardRankMoveDefinition); }
public static ChessPieceMoveDefinition PawnAttackMoveDefinition(ChessPieceColor orientation) { if (whitePawnAttackFileMoveDefinition == default(ChessPieceMoveDefinition)) { whitePawnAttackFileMoveDefinition = new ChessPieceMoveDefinition(1, 1, 1, ChessPieceMoveDirections.PositiveFile | ChessPieceMoveDirections.PositiveRank); } if (blackPawnAttackFileMoveDefinition == default(ChessPieceMoveDefinition)) { blackPawnAttackFileMoveDefinition = new ChessPieceMoveDefinition(1, 1, 1, ChessPieceMoveDirections.PositiveFile | ChessPieceMoveDirections.PositiveRank); } return(orientation == ChessPieceColor.White ? whitePawnAttackFileMoveDefinition : blackPawnAttackFileMoveDefinition); }
public static ChessPieceMoveDefinition PawnStandardMoveDefinition(ChessPieceColor orientation) { if (whitePawnStandardFileMoveDefinition == default(ChessPieceMoveDefinition)) { whitePawnStandardFileMoveDefinition = new ChessPieceMoveDefinition(1, 0, 1, ChessPieceMoveDirections.PositiveFile); } if (blackPawnStandardFileMoveDefinition == default(ChessPieceMoveDefinition)) { blackPawnStandardFileMoveDefinition = new ChessPieceMoveDefinition(1, 0, 1, ChessPieceMoveDirections.NegativeFile); } return(orientation == ChessPieceColor.White ? whitePawnStandardFileMoveDefinition : blackPawnStandardFileMoveDefinition); }