4 This is a Python engine and interface for building games similar to
5 the 1957 La ConquĂȘte du Monde by Albert Lamorisse (of "Le Ballon rouge
6 / The Red Balloon" fame). The game is perhaps better known as Risk,
7 and is produced by Parker Brothers (now a division of Hasbro).
9 Benefits over other open source implementations:
11 * simple, extensible implementation
18 PyRisk is available as a Git repository::
20 $ git clone http://www.physics.drexel.edu/~wking/code/git/pyrisk.git
22 The most recent commit is also available as a gzipped tarball at::
24 http://www.physics.drexel.edu/~wking/code/tar/pyrisk.tgz
26 Once you get the source, installation is via Docutils::
28 pyrisk$ python setup.py build
29 pyrisk$ python setup.py install
35 To setup play-by-email, you'll have to have some method to redirect
36 appropriate messages into a named pipe. With procmail, that will
40 * ^Subject:.*\[PyRisk.*
46 | /bin/echo -e '\000' >> /path/to/named/pipe
49 The echo command appends a NULL byte to the FIFO, which (I think), helps
50 the read() in _get_msg break at the appropriate point.
52 Once you have the procmail rule setup, just add your EmailPlayers to
55 from pyrisk.base import generate_earth, Player, Engine
56 from pyrisk.player.email import IncomingEmailDispatcher, \
57 OutgoingEmailDispatcher, EmailPlayer
58 world = generate_earth()
59 ied = IncomingEmailDispatcher(fifo_path='/tmp/pyrisk.in')
60 oed = OutgoingEmailDispatcher(return_address='server@example.com')
61 players = [EmailPlayer('Alice', 'alice@big.edu', ied, oed),
62 EmailPlayer('Bob', 'bob@fish.net', ied, oed),
64 e = Engine(world, players)