Asana interview question

Design a jigsaw puzzle algorithm, given a Piece class, a Side class containing sideTypes, and a helper function which returns whether or not two pieces are a match