main: Support "None" special seed
parent
e1ce55cef9
commit
7f73da182b
4
main.py
4
main.py
|
@ -12,10 +12,10 @@ if len(argv) < 2 or len(argv) > 4:
|
||||||
print('Usage: {} <filename> [seed [forbidden,spells,...]]'.format(argv[0]))
|
print('Usage: {} <filename> [seed [forbidden,spells,...]]'.format(argv[0]))
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if len(argv) == 2:
|
if len(argv) == 2 or (len(argv) >= 3 and argv[2] == 'None'):
|
||||||
seed = str(time()).split('.')[0]
|
seed = str(time()).split('.')[0]
|
||||||
if len(argv) >= 3:
|
if len(argv) >= 3:
|
||||||
seed = argv[2]
|
seed = argv[2] if argv[2]
|
||||||
if len(argv) == 4:
|
if len(argv) == 4:
|
||||||
spells = argv[3].split(',')
|
spells = argv[3].split(',')
|
||||||
forbidden = [spell_map[i] for i in spells]
|
forbidden = [spell_map[i] for i in spells]
|
||||||
|
|
Loading…
Reference in New Issue