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.15.tar.gz (13.6 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.15-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: WRDice-0.0.1.15.tar.gz
  • Upload date:
  • Size: 13.6 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.15.tar.gz
Algorithm Hash digest
SHA256 bb6272e3b39592f925fab1d4345f1e4bc3dee1e81c53446f1debdd22bba19c3e
MD5 a8b769b2a9810f5d812fbbf54b0a84db
BLAKE2b-256 5432893242057b65bf4db355f51489ead8cc1edf4c7b816163285485217886a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: WRDice-0.0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 17.8 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.15-py3-none-any.whl
Algorithm Hash digest
SHA256 6e11c6787ee74a0b46afbf97713efd9775552b13ce35b08e4f401b242b67eb7b
MD5 6394ce43544a181a7e5ba33a103c2745
BLAKE2b-256 654a772aadb3efbd312cc2cebcf105a8e216a40577ef52859e4035df57e652bf

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