This is not yet complete. I think I'm going to go a different way with using bonus (research) information, but I wanted a copy of this in the history just in case.
27 lines
855 B
Python
27 lines
855 B
Python
from flashcards.maps import (create_maps,
|
|
read_data_to_dict,
|
|
read_name_data_to_dict,
|
|
read_string_data_to_dict)
|
|
from flashcards.fighting import calculate_hits_to_kill
|
|
|
|
|
|
|
|
# specify the namelist to be used to create the deck
|
|
# give the relative path of the file from config.namelists_dir
|
|
namelist = 'units-basic.txt'
|
|
|
|
# key into json file specifying which data you want
|
|
name_json_keys = 'units_buildings'
|
|
data_json_keys = ('data', 'Unit')
|
|
string_json_keys = ()
|
|
|
|
#name_data = read_name_data_to_dict(string_json_keys)
|
|
_, nums = create_maps(namelist, name_json_keys)
|
|
data = read_data_to_dict(data_json_keys)
|
|
|
|
hits = calculate_hits_to_kill('Hulk',
|
|
'Fire Ship',
|
|
data,
|
|
nums)
|
|
print(hits)
|