-
Notifications
You must be signed in to change notification settings - Fork 0
dnd tools
jasper-zanjani edited this page Aug 6, 2020
·
1 revision
Analysis of dnd-tools
- Character creation seems like a place where OO techniques would be best suited
- The interactive portions would be great to adapt to
npyscreen -
enumwould be great for the strictly defined sets of characteristics, like race and class - Output of tabulet data -
tabulate
expand accepts dictionary objects that use range objects as keys and return an "expanded" dictionary object that includes every individual value within that range.
start_fn is the main entry point of the utility and depends on user to input an option that corresponds to one of 8 options
- Character creation, which calls the following functions in order:
race_fn declares the char_race variable as a global, and it is defined by user input.
- If the value corresponds exactly to one provided in [
race_short], it is left unchanged. - If the input indicates random choice, a random element is selected using
random.choiceand assigned tochar_race - Otherwise, the function calls itself again!
class_fn presents contents of class_npc or char_class, based on whether or not User is defining an NPC or the character
- argparse ?
- array ?
- asyncio ?
- bisect ?
- csv ?
- ctypes ?
- curses ?
- datetime ?
- functools ?
- getpass ?
- glob ?
- heapq ?
- http ?
- json ?
- logging ?
- optparse ?
- os ?
- pathlib ?
- platform ?
- pythonnet ?
- random ?
- socket ?
- subprocess ?
- sqlite3 ?
- sys ?
- termcolor ?
- threading ?
- trace ?
- typing ?
- unittest ?
- urllib ?
- venv ?
- weakref ?
- winrm ?