A script to solve the "Scramble Squares" golf puzzle
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A script to solve the "Scramble Squares" tile puzzle, Golf style

I got tired of it looking like this

To solve it, run ruby solver.rb

Returned are a set of answers, each with 9 tiles defined this way (as elements in the array)

0 1 2
3 4 5
6 7 8

Each element in the array has four values, representing the images on the top, right, bottom, and left sides, in that order. The images are coded as two-character values, with the image defined as the first character, and the ordinality as the second. For example:

  • WB: the Woman image, Bottom
  • CT: the Club image, Top

The codes are:

  • Woman
  • Bag
  • Man
  • Club