corrects references to positionBefore and positionAfter in Move
checks whether piece is null before trying to set kingPosition in Position
adds forEach back to Square