|P is for Practical|
Re^2: App::SweeperBot - Perl plays minesweeper, automatically.by pjf (Curate)
|on May 24, 2008 at 05:41 UTC||Need Help??|
A new release (0.03) of App::SweeperBot is being uploaded to the CPAN as I write this.
The new version uses a simple OO design from which you should be able to inherit cleanly. If you want to replace the AI, it should be as simple as:
You can find what's in a given square using $game_state->[$x][$y]. Note that App::SweeperBot considers (1,1) to be the top-left square (not (0,0)).
The new release has all entire API documented; there are methods for stepping on squares, flagging squares, stomping (middle-clicking) on squares, and a few helpers for things like "how many unknown mines are adjacent to this square"?
Feedback, questions, and criticism all welcome.
Perl Training Australia