From dc12ba78596d79a7100a8e8f428291ed88f97030 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Sun, 21 Jul 2024 01:21:20 -0600 Subject: [PATCH] Mods --- README.md | 2 +- cromulant/game.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 632fd92..aab55a8 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ pipx install git+https://github.com/madprops/cromulant --force ## Algorithm 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. The top score is calculated as (Triumph - Hits). diff --git a/cromulant/game.py b/cromulant/game.py index 08a1455..9630566 100644 --- a/cromulant/game.py +++ b/cromulant/game.py @@ -166,10 +166,14 @@ class Game: if not ant: return - num = random.randint(1, 12) + num = random.randint(0, 12) status = "" method = "normal" + if num == 0: + Ants.merge() + return + if num == 1: ant.triumph += 1 method = "triumph" @@ -191,8 +195,6 @@ class Game: elif num == 8: status = Utils.random_country([]) method = "travel" - elif num == 9: - Ants.merge() else: status = Utils.rand_sentence.sentence()