View Single Post
Old Jan 7th, 2007, 10:22 PM   #1
cwl157
Professional Programmer
 
Join Date: Feb 2005
Posts: 333
Rep Power: 4 cwl157 is on a distinguished road
matching squares

Alright heres the problem. I recieved a puzzle for christmas to try and solve. Its not a programming puzzle or anything but i want to make a program to solve it. The puzzle contains 9 squares. Each square has 4 pictures on it. The goal is to match up the pictures on all the squares. here is a link to the website of the company that makes the puzzle because i'm not that good at explaining.
http://www.b-dazzle.com/scramble.asp

The one i have compares different sharks. Basically the side of the square either has a top or a bottom and then the correct top must match the correct bottom.

I am thinking a Square class and have 4 labels in the constructor and then in main create 9 instances of the Square class to match the 9 puzzle pieces i have. I also am thinking in the Square class to have a SquareAmount method that says how many squares are left and accessor methods for the 4 labels to compare them. I want the end result to be a grid of numbers saying which Square goes where and then each square from the puzzle would match a number that the computer program spits out. I do not know how to compare all of these possible combinations though. I thought about just comparing sides of the squares until there is a match but i need to check all sides of every square every time and thats a lot.
cwl157 is offline   Reply With Quote