implemented hasMoved correctly, and corrected pawn movement check