in reply to Re: Word Search Puzzle
in thread Word Search Puzzle
Nice solution - eliminates nearly identical function. I guess I was following my original C++ code.our %step = ( N => { R => -1, C => 0 }, NE => { R => -1, C => +1 }, E => { R => 0, C => +1 }, SE => { R => +1, C => +1 }, S => { R => +1, C => 0 }, SW => { R => +1, C => -1 }, W => { R => 0, C => -1 }, NW => { R => -1, C => -1 } );
You don't need all of those use constant N => 0; either -- the string literal is just as good as a constant.
I'm not clear on this :-)
oops!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Word Search Puzzle
by QM (Parson) on Jan 28, 2004 at 00:12 UTC | |
by Anonymous Monk on Jan 28, 2004 at 01:48 UTC |