Waterworld is a variant on the ever-popular game Minesweeper, with two differences:
|
Although the game is fun to play in it's own right, we use it to illustrate how playing the game is really just an application of logic—in particular, inference rules, as explained in TeachLogic's Base module. |
WaterWorld runs on top of PLT Scheme (DrScheme), and therefore runs on Windows (95 and up), Mac OS X, or Unix running the X window system.
You are free to browse and edit the source; let us know if you have a contribution!
Synopsis: left-click on a location to indicate that it's safe (water), and right-click (or control-click) to indicate unsafe (pirate). At the same time, holding down the shift key to indicates an assertion, otherwise your move is considered a guess.
There are several possible outcomes to a move; WaterWorld will always continue the game, even though some of those outcomes are mistakes where normally a game would end:
.
You lose.
The computer will offer to show you a counterexample,
but allow you continue anyway.
(Note that even if your assertion happened to be the right answer,
it's still a mistake—there's a difference between knowing that
you're guessing, and claiming to be sure when you're really not.)
¹ Another slight difference is that in traditional Minesweeper, flagging a location as dangerous has no actual meaning—it is just a note to yourself. This isn't so in Waterworld: when you mark a WaterWorld location as dangerous, you'll lose if it's actually safe. (back to text)
² Note that installing DrScheme to run Waterworld is a bit like visiting the Louvre just to get a postcard of the Mona Lisa: sure it suffices, but it also provides other opportunities. You can use DrScheme to learn how to program and to write sophisticated programs. (back to text)
³ Well, remember to watch for corner cases: If you've set the total number of pirates to be zero, then even your first move should be an assertion. (back to text)
| TeachLogic Home Page, | Please let us know of any suggestions. | Last modified 2005.Dec.15. | |
|
|