Chess.Data.Piece.Pawn.IsPawnsSecondMoveInProperDirection C# (CSharp) Method

IsPawnsSecondMoveInProperDirection() private method

private IsPawnsSecondMoveInProperDirection ( Move move, Entities lastMove, ChessPiece piece ) : bool
move Chess.Data.Entities.Move
lastMove Entities
piece Chess.Data.Entities.ChessPiece
return bool
        private bool IsPawnsSecondMoveInProperDirection(Move move, Entities.Move lastMove, ChessPiece piece)
        {
            return piece.PieceType == PieceType.Pawn
                   && lastMove.EndRow == move.EndRow - LegalDirectionByTeam()
                   && lastMove.EndColumn == move.EndColumn
                   && piece.MoveCount == 1;
        }