https://github.com/madeindjs/zombie-outbreak
A 'Zombie Apocalypse' simulator created in Python
https://github.com/madeindjs/zombie-outbreak
Last synced: 8 months ago
JSON representation
A 'Zombie Apocalypse' simulator created in Python
- Host: GitHub
- URL: https://github.com/madeindjs/zombie-outbreak
- Owner: madeindjs
- Created: 2016-06-14T20:07:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-20T17:18:55.000Z (almost 10 years ago)
- Last Synced: 2025-02-05T21:41:50.639Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zombie-Outbreak
A Zombie Apocalypse simulator created in Python.
## Synopsis
Did you now how many time the humanity survive in a Zombie Apocalypse? Do you think Humans can kill all zombies to prevent infection? I don't know too but **Zombie Outbreak** can say it!

## Algorithm
The scene take place in a 80*10 place in your terminal represent the entire world. Each turn represent 6 hours in a day. This is a classic turn:
1. Each Zombie / Humans move orthogonally (top, bottom, left & right):
2. If there are humans in a same area than a Zombie, the zombie will attack him. At this point, there are 1/2 chance that:
* **zombie kill human**. In this case, the human transform in a zombie
* **human kill zombie**. In this case, the zombie is dead
3. if there are at least two humans in the same area and no zombie, humans **have a sex**. At this point, there are 1/3 chance that a new human birth
## Launch
sudo pip install clint #for terminal color support
git clone https://github.com/a-tamang/Zombie-Outbreak
python zombie-outbreak
if you want, you can specify a number of zombie and / or humans with argparse:
python zombie-outbreak --zombies 30 --humans 20
## Developpement
Developped only in Python from an originally idea of [Ashish Tamang](https://github.com/a-tamang) in winter 2012. Forked and updated in June 2016 by [Alexandre Rousseau](https://github.com/madeindjs).
### Dependencies
* [clint](https://pypi.python.org/pypi/clint/) for terminal color (it's more beautifull)
### Unit Test
You can run units test with this command
python tests.py