Skip to main content

Python simulator for war room battles

Project description

WRDice

Backend for WRBattleSim

Installation

Using pipy:

python -m pip install wrdice

Usage

Units are added for land, air and sea in the color order

[yellow, blue, green, red, black]

Units are assigned to differnet stances either by their numerical value or -1 to assign all units to a given stance

stances = [defensive/esocort/anti-air], [offensive/ground]

=======

Units are added for land, air and sea in the color order  
[yellow, blue, green, red, black]  
Units are assigned to differnet stances either by their numerical value or -1 to assign all units to a given stance  
stances = [defensive/esocort/anti-air], [offensive/ground]

config = wr20_vaniilla_options NO_UNITS = [0,0,0,0,0] ALL_UNITS = [-1,-1,-1,-1,-1]

B = Army(units_land = [3,0,0,0,0], units_air = [0,0,0,0,0], units_sea = [0,0,0,0,0], options = config) B.apply_stance(stance_land = [ALL_UNITS, NO_UNITS], stance_air = [NO_UNITS, ALL_UNITS], stance_sea = [NO_UNITS, ALL_UNITS])

A = Army(units_land = [3,2,0,0,0], units_air = [0,0,0,0,0], units_sea = [0,0,0,0,0], options = config)

A.apply_stance(stance_land = [NO_UNITS, ALL_UNITS], stance_air = [NO_UNITS, ALL_UNITS], stance_sea = [ALL_UNITS, NO_UNITS])


Build simulation and run with given army setups.

```python
sim = Simulate(None, None)
sim.run(CombatSystem.WarRoomV2, 
                config=config, 
                armyA=A,
                armyB=B)
sim.eval_statistics()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

WRDice-0.0.1.17.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WRDice-0.0.1.17-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file WRDice-0.0.1.17.tar.gz.

File metadata

  • Download URL: WRDice-0.0.1.17.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for WRDice-0.0.1.17.tar.gz
Algorithm Hash digest
SHA256 8b5bfc6384d07c25af3d679f2b7929cad600049bf176eaa245b56af8e5593903
MD5 ceae63c253804c5e016c5b4b60c991f5
BLAKE2b-256 cfe78ef932d71436f0723f742d45e633f376fbda44fd87f0baede0a75ef8c8c6

See more details on using hashes here.

File details

Details for the file WRDice-0.0.1.17-py3-none-any.whl.

File metadata

  • Download URL: WRDice-0.0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for WRDice-0.0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 dbde3ac0a94eee853d90922cd02c7f39de07f33312f2616f76853ad7f706675f
MD5 a5640ba1837cf66f9f8fb5953aa77b1b
BLAKE2b-256 d17e9b4d02172938fea012f32de5b4f724cdb5ef27b1a6738d790769a441170a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page