madrabbit » ray » boggle solver
'; for ($i=0, $cube=0; $i"; print "'. strtoupper($board{$i}); $realboard=$realboard . $board{$i}; if ($board{$i} == 'q') { print 'u'; if ($board{$i+1} == 'u') $i++; } print ''; if ($cube % 5 == 4) print ""; $cube++; } print "
Boggle board

\n"; $cmd = "/home/ray/bin/bog_linear 2>/dev/null /home/ray/doc/simplewordsofficial.linearized "; $cmd = $cmd . $realboard; $pipe = popen($cmd, "r"); $wordcount=0; $rowcount=0; $previous_word=" "; while ($word = fgets($pipe, 1024)) { if ($wordcount==0) print '
 
'; if ( ($word{0} != $previous_word{0}) && ($wordcount != 0) && ($rowcount != 0)) { while (12-($rowcount++)) print '
'; $rowcount=0; print '
'; } if ($rowcount % 12 == 0) print "\n" . '
'; print chop($word) . "
"; if ($rowcount % 12 == 11) { print '
'; $rowcount=-1; } $wordcount++; $rowcount++; $previous_word=$word; } if ($wordcount % 12 != 11) print '
'; print '
 
'; pclose($pipe); } else { ?>

Enter the board cubes in the box below. Enter the 'Qu' cube as 'Q'. A sample board is filled in, to give you an idea.

Board: