This is a future digital implementation of the original Pandemic board game. This project is started after this repository and is expected to be written in Python with perspectives to become a standalone application.
v0.2.0
This release implements MVP providing minimalistic console client with limited gameplay and hotseat multiplayer introduced. Also, it's now adapted for being wrapped in a simple server application.
Here's part of how a console game session looks for now:
Game mechanics:
- Basic player actions
- Epidemic events
- Outbreak events
- Win and Fail conditions
- Effective treats for cured diseases
- Special characters and their actions
- Event Cards
- Hand Limit
For now, the application requires a Python version 3.7 or higher to be installed on your computer for a console playing.
To play a game, run a console client in an interactive mode:
python3 pyndemic.pyThe console mode supports the following commands:
move <location>- perform a standard move actionfly <location>- perform a direct flight actioncharter <location>- perform a charter flight actionshuttle <location>- perform a shuttle flight actionbuild- perform a laboratory build actiontreat <colour>- perform a treat disease actioncure <card_1> ... <card_5>- perform a cure disease actionshare <card> <player name>- perform a share knowledge actionpass- end turn
Also you can do Ctrl+C to terminate the game.
It is possible to launch a game session inside another program, e.g. on a server. To do this, create and start a game object, and after that, you can interact with the game by a sequence of requests and responses.
While creating the game, you can pass some game parameters as keyword arguments. For now the supported game parameters are "players", "random_state", and "epidemics" (difficulty level).
See API description to check how to create appropriate request objects.
from pyndemic.controller import GameController
controller = GameController(players=['Alpha', 'Bravo', 'Charlie', 'Delta'])
controller.run()
...
# Somewhere in the code
response = controller.send(request)
do_something_with_response(response)
...
# After game end
controller.stop()For tests run:
python3 -m unittestAnd for running test game session you can type:
python3 pyndemic.py 42 <test/test_input.txtFrom Developer Zero
What is this?
This is a simple project I started a while ago to help learn how to use vim, python and github. It has changed a bit from it's original form, and is now an attempt to create a version of the game Pandemic with AI players who try to complete the game, and is now written in Java rather than python.
