This commit is contained in:
Auric Vente 2024-07-21 01:21:20 -06:00
parent 12145b9020
commit dc12ba7859
2 changed files with 6 additions and 4 deletions

View File

@ -43,7 +43,7 @@ pipx install git+https://github.com/madprops/cromulant --force
## Algorithm ## Algorithm
A random ant is picked based on weights (oldest update date weighs more). A random ant is picked based on weights (oldest update date weighs more).
Then a random number between 1 and 10 is picked. Then a random number between 0 and 12 is picked.
For each number an action happens to produce an update. For each number an action happens to produce an update.
The top score is calculated as (Triumph - Hits). The top score is calculated as (Triumph - Hits).

View File

@ -166,10 +166,14 @@ class Game:
if not ant: if not ant:
return return
num = random.randint(1, 12) num = random.randint(0, 12)
status = "" status = ""
method = "normal" method = "normal"
if num == 0:
Ants.merge()
return
if num == 1: if num == 1:
ant.triumph += 1 ant.triumph += 1
method = "triumph" method = "triumph"
@ -191,8 +195,6 @@ class Game:
elif num == 8: elif num == 8:
status = Utils.random_country([]) status = Utils.random_country([])
method = "travel" method = "travel"
elif num == 9:
Ants.merge()
else: else:
status = Utils.rand_sentence.sentence() status = Utils.rand_sentence.sentence()