Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Games > TBS

    PyRisk 0.1

    Download button

    No screenshots available
    Downloads: 183  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    W. Trevor King | More programs
    GPL / FREE
    April 27th, 2011, 13:54 GMT
    ROOT / Games / TBS

     Read user reviews (0)  Refer to a friend  Subscribe

    PyRisk description

    Python Risk engine with assorted player interfaces

    PyRisk is a Python engine and interface for building games similar to the 1957 La Conquête du Monde by Albert Lamorisse (of "Le Ballon rouge / The Red Balloon" fame). The game is perhaps better known as Risk, and is produced by Parker Brothers (now a division of Hasbro).

    Benefits over other open source implementations:

    - simple, extensible implementation
    - play-by-email

    Getting PyRisk

    PyRisk is available as a Git repository:

    git clone http://www.physics.drexel.edu/~wking/code/git/pyrisk.git

    The most recent commit is also available as a gzipped tarball at:

    http://www.physics.drexel.edu/~wking/code/tar/pyrisk.tgz

    Once you get the source, installation is via Docutils:

    pyrisk$ python setup.py build
    pyrisk$ python setup.py install


    Getting started

    To setup play-by-email, you'll have to have some method to redirect appropriate messages into a named pipe. With procmail, that will look something like:

    :0
    * ^Subject:.*\[PyRisk.*
    {
     :0 wc
     /path/to/named/pipe

     :0
     | /bin/echo -e '\000' >> /path/to/named/pipe
    }


    The echo command appends a NULL byte to the FIFO, which (I think), helps the read() in _get_msg break at the appropriate point.

    Once you have the procmail rule setup, just add your EmailPlayers to your game and go:

    from pyrisk.base import generate_earth, Player, Engine
    from pyrisk.player.email import IncomingEmailDispatcher, \
     OutgoingEmailDispatcher, EmailPlayer
    from pyrisk.graphics import WorldRenderer
    world = generate_earth()
    ied = IncomingEmailDispatcher(fifo_path='/tmp/pyrisk.in')
    oed = OutgoingEmailDispatcher(return_address='server@example.com')
    wr = WorldRenderer()
    players = [EmailPlayer('Alice', 'alice@big.edu', ied, oed, wr),
     EmailPlayer('Bob', 'bob@fish.net', ied, oed, wr),
     Player('Charlie')]
    e = Engine(world, players)
    e.run()
    ied.close()



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Python engine | game engine | player interfaces | Python | game | engine

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM