Update puzzle.js

complete rewrite of puzzle shapes and added rotation