| CIT
591 Assignment 4: Jigsaw Puzzle Sample
Output Fall 2004, David Matuszek |
I said I would provide some sample output for this program, and here it is. Your output should look something like this, but it doesn't have to be identical.
Creating a 3 by 4 puzzle...
Created piece 1: [0 0 -520 -637]
Current state of puzzle:
1 --- --- ---
--- --- --- ---
--- --- --- ---
Created piece 2: [0 -520 -399 -602]
Current state of puzzle:
1 2 --- ---
--- --- --- ---
--- --- --- ---
Created piece 3: [0 -399 546 -79]
Current state of puzzle:
1 2 3 ---
--- --- --- ---
--- --- --- ---
Created piece 4: [0 546 0 -435]
Current state of puzzle:
1 2 3 4
--- --- --- ---
--- --- --- ---
Created piece 5: [-637 0 -349 -56]
Current state of puzzle:
1 2 3 4
5 --- --- ---
--- --- --- ---
Created piece 6: [-602 -349 574 -599]
Current state of puzzle:
1 2 3 4
5 6 --- ---
--- --- --- ---
Created piece 7: [-79 574 307 -239]
Current state of puzzle:
1 2 3 4
5 6 7 ---
--- --- --- ---
Created piece 8: [-435 307 0 494]
Current state of puzzle:
1 2 3 4
5 6 7 8
--- --- --- ---
Created piece 9: [-56 0 -567 0]
Current state of puzzle:
1 2 3 4
5 6 7 8
9 --- --- ---
Created piece 10: [-599 -567 -335 0]
Current state of puzzle:
1 2 3 4
5 6 7 8
9 10 --- ---
Created piece 11: [-239 -335 747 0]
Current state of puzzle:
1 2 3 4
5 6 7 8
9 10 11 ---
Created piece 12: [494 747 0 0]
Current state of puzzle:
1 2 3 4
5 6 7 8
9 10 11 12
Puzzle completed!
Now shuffling the array...
[LPuzzlePiece;@10b62c9
Current state of puzzle:
--- --- --- ---
--- --- --- ---
--- --- --- ---
-----------------------------------------------
Now trying to solve the puzzle...
Placing piece 1: [0 0 -520 -637]
Remaining pieces: { 11 7 3 8 12 2 6 5 9 10 4 }
Current state of puzzle:
1 --- --- ---
--- --- --- ---
--- --- --- ---
Placing piece 2: [0 -520 -399 -602]
Remaining pieces: { 11 7 3 8 12 6 5 9 10 4 }
Current state of puzzle:
1 2 --- ---
--- --- --- ---
--- --- --- ---
Placing piece 3: [0 -399 546 -79]
Remaining pieces: { 11 7 8 12 6 5 9 10 4 }
Current state of puzzle:
1 2 3 ---
--- --- --- ---
--- --- --- ---
Placing piece 4: [0 546 0 -435]
Remaining pieces: { 11 7 8 12 6 5 9 10 }
Current state of puzzle:
1 2 3 4
--- --- --- ---
--- --- --- ---
Placing piece 5: [-637 0 -349 -56]
Remaining pieces: { 11 7 8 12 6 9 10 }
Current state of puzzle:
1 2 3 4
5 --- --- ---
--- --- --- ---
Placing piece 6: [-602 -349 574 -599]
Remaining pieces: { 11 7 8 12 9 10 }
Current state of puzzle:
1 2 3 4
5 6 --- ---
--- --- --- ---
Placing piece 7: [-79 574 307 -239]
Remaining pieces: { 11 8 12 9 10 }
Current state of puzzle:
1 2 3 4
5 6 7 ---
--- --- --- ---
Placing piece 8: [-435 307 0 494]
Remaining pieces: { 11 12 9 10 }
Current state of puzzle:
1 2 3 4
5 6 7 8
--- --- --- ---
Placing piece 9: [-56 0 -567 0]
Remaining pieces: { 11 12 10 }
Current state of puzzle:
1 2 3 4
5 6 7 8
9 --- --- ---
Placing piece 10: [-599 -567 -335 0]
Remaining pieces: { 11 12 }
Current state of puzzle:
1 2 3 4
5 6 7 8
9 10 --- ---
Placing piece 11: [-239 -335 747 0]
Remaining pieces: { 12 }
Current state of puzzle:
1 2 3 4
5 6 7 8
9 10 11 ---
Placing piece 12: [494 747 0 0]
Remaining pieces: { }
Current state of puzzle:
1 2 3 4
5 6 7 8
9 10 11 12
Done solving puzzle.
Checking for correctness, and...everything fits!
As a check, I'll swap a couple of pieces, and...
isCorrectlyAssembled() now returns false