This project has been archived by its maintainers, and is no longer receiving any updates.
========
This town is not big enough for both of our bots
What is this?
-------------
Showdown is a game for two bots (and for the people to write those bots)
The rules
---------
.. image:: https://nerdist.com/wp-content/uploads/2016/08/Good-Bad-Ugly-Trio.jpg
:alt: Showdown (mexican standoff) from The Good, the Bad and the Ugly. (image from https://nerdist.com/)
Basics
^^^^^^
This game is played by 2 bots (a.k.a players), implemented as 2 different command line programs.
Each bot represents an opponent in a western movie style showdown. They both have a 6-bullet Colt, and start with one loaded bullet. The aim is to kill the opponent by shooting them while they are vulnerable.
Player play at the same time by issuing one of the 3 allowed commands : ``shoot``, ``dodge``, ``reload``. Then, if both player survive, they see what their opponent did, and start over, etc.
Who dies ?
^^^^^^^^^^
(A and B can be any of the 2 players)
- If A shoots while B reloads, B dies
- If A and B both shoot but B has no more bullets, B dies
- If A shoots while B issues an invalid command or their program has exited, B dies
- If B has not issued a command within one second (but their program is still running), B dies. This rule is to avoid bots that will slow the game at each and every turn.
In all other cases, the game continues.
Ammunition
^^^^^^^^^^
Each player start with 1 bullet in their gun. Shooting always removes a bullet from your gun (except if it's already empty). Reloading always adds a bullet to your gun (except if it already has 6 bullets and is full)
Turns & victory
^^^^^^^^^^^^^^^
The game stops when an opponent is dead, or when at least one opponent takes more than one second to give its intructions, or after 100 turns.
If there is no winner, the winner will be selected as the one who dodged the least frequently. If both opponent dodged the same amount of time, a winner is randomly selected.
Inputs, outputs, timings
^^^^^^^^^^^^^^^^^^^^^^^^
Here, ``print`` means write in stdout, followed by a newline (`\n`), and ``read``means read from stdin until newline.
The program should print its name (within 10 seconds after the start of the process)
Then, as long as the game is on, the program should loop over the two following action.
The program should print its action for the current turn among ``shoot``, ``dodge`` and ``reload``.
Then, the program may read the action the opponent did. The action may be ``shoot``, ``dodge``, ``reload``, ``shoot_no_bullet`` if the opponent shot bu had no bullet left, ``stand`` if the opponent sent an invalid command.
A program has one second after it receives the opponent's action to print its own action, otherwise the game will be terminated.
The program
-----------
.. code::bash
showdown first command with args -vs- second command with args
Metadata
Release files for showdown 0.1.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| showdown-0.1.0.dev0.tar.gz | 10.6 kB | Without provenance | Details for showdown-0.1.0.dev0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| showdown-0.1.0.dev0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for showdown-0.1.0.dev0-py2.py3-none-any.whl |
Total release size: 24.5 kB
Release files / showdown-0.1.0.dev0.tar.gz
| Download URL | showdown-0.1.0.dev0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce3629452204583f08d3e9b029a74c9d52f5c19506adb5890c5abe89971d3ba2
|
|
BLAKE2b-256 checksum How to use checksums |
2d56e19e8015a051d4b779ec2a54253a319bc1e1a6e534c9ed10bb34ce2b42e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / showdown-0.1.0.dev0-py2.py3-none-any.whl
| Download URL | showdown-0.1.0.dev0-py2.py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8509f371a3b61b36a4f7777b376555ce4b4de2797ae6091684cba842521c338b
|
|
BLAKE2b-256 checksum How to use checksums |
93f68039814988a3f2c06bd293da8602c74b7e681cb2894b2e29307ad7f2039c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for showdown 0.1.0.dev0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.