- or download this
# If piece is efficiently placed, try the next pentomino
# (tend to cluster them towards origin)
if (!exceeds_hole_count($index)) { solve ($index+1); }
- or download this
($x, $y) = next_position_accross ( $x, $y );
# if the pentomino has run off the board, backup
...
# Start the piece well out onto the board
if (($x+$y) < $index) { next };
- or download this
# Optimization by which piece never starts too far out on board.
if (($x+$y) > (2*$index)) { print 'b'; next };
if ($y > $index) { print 'y'; return };
last;