Skip to content

darkmeadow/quidditch_simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Witchcraft & Wizzardry Quidditch Simulator

A Quidditch game simulator based on Wackstevens Witchcraft and Wizzardry System:

Table of Contents

Installation

Clone repository or download files into local working directory.

Usage

Requirements

create a Match json file containing two team jsons as a list

  • Create and open a new .json file
  • Add two teams (see Example_team.json) into the file in list format
[{"Name": "TeamName", ...}, {"Name": "Teamname", ...}]

Optionally:

  • add bonuses/pentalties modifyer to each players base value

  • add Player Names for each player

for in full Datatype explanations got to examples

Command line

  1. In commandline use:

    python -m quidditch.py --team-file Path/to/file/[filename].json
    • If you want to simulate weather effects add

      --use-weather
      
    • If you only want to use one beater and chaser add

      --single-roles
      
    • To return a more in depth game log add

      --collect-metadata
      
  2. Open the [teamname]vs[teamname]_result.json file to see the game results

as Module

  1. Import the quidditch.py into your module

  2. Invoke load_teams to import match player data

    load_teams(Path/to/file/[filename].json)
  3. Invoke quidditch.init() to add the custom loglevel (GAMESTEP: 15)

    • you have to invoke the function even if you want to ignore gamestep messages
  4. Invoke run_game() with the wanted parameter to start the simulation

    run_game(teams, **kwargs)

    Optional arguments:

    1. use_duplicate_rolls : boolean

      • Flag if you want to alternate between chasers and beaters
      • Default: True
    2. use_weather : boolean

      • Flag if you want to use weather calculations in the game
      • Default: False

ToDo

  • Simulate seasons/leagues

  • Web interface to create/maintain quidditch teams

  • Verbose gamelogs to get a condenced game review

  • analyse Game/ season outcomes

  • Add house rules

Credits

Thanks to

  • Wacksteven for creating the system tablestory.tv/waw
  • Kujio for building the discord bot that inspired this simulation
  • Last-Socratic for hist quidditch analyser and code insight

About

A programm that simulates quidditch matches

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages