Change class conditional to use instanceof

Made the update to use instanceof rather than "piece.getClass() == **.class"