in reply to "Bookworm" solver project

Why use a graphing module?

I would spit out HTML that gives the grid, and then a list of words. Each word is wrapped in a JavaScript link that calls a function which clears existing markings, then proceeds to color the letters in such a way that it is obvious what order the letters make that word.

One way to do that would be to have multiple arrows which can be set as a background, and set all of the classes of the table cells appropriately to make the right background images show in the right places.

Replies are listed 'Best First'.
Re^2: "Bookworm" solver project
by japhy (Canon) on May 08, 2005 at 20:10 UTC
    I meant a graphing module that I would use to store the structure of the board, as opposed to writing a Graph and Node class myself.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
      Oh, that. You're overdesigning, IMO. Just use a 2-dimensional array for the characters, and have a corresponding 2-dimensional array of functions that know what the neighbours of any cell are. See Re (tilly) 1: 5x5 Puzzle for an example of the approach that I'm talking about.