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]

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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: WRDice-0.0.1.12.tar.gz
  • Upload date:
  • Size: 13.7 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.12.tar.gz
Algorithm Hash digest
SHA256 bd51ebdcb0592bb0ee83872edf39b7832e6273f4e6d40b7ebb91586d60299bdd
MD5 6dbb33f469af94c6e844c8b3342d94d0
BLAKE2b-256 bc6fb9c5aceac15a2cd5046519f50ba64cd30ea6fe0111e262ec862a1e82c35f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: WRDice-0.0.1.12-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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a019790f0fa9144a35147727e8fd97ef006c007ecc94a753e6125b53f61d1c8d
MD5 c321734f484dd09c0dc16b9c8b53e574
BLAKE2b-256 3d57f0b007b04328ecfcec643f333ea7debdc85aec81b50555597d038f4167c5

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