jigsaw puzzle and pieces

Dear all,
I am looking for the jigsaw puzzle and pieces code or any guideline to write this program. I have a limit time to write this code, I should generate a puzzle program which the program then randomizes the pieces and displays the randomized puzzle to the user. The user then can manually try to piece the puzzle manually or have the game solve it for them at any point in time. Each puzzle piece has 4 sides. Each puzzle has at least 9 pieces.
Any help or hints will be appreciated.
Topic archived. No new replies allowed.