Factored out extra piece parameters in addLegalMoves functions.