From 9882526a165f1b25c32977c332196aaf68a5e5b6 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Mon, 22 Jul 2024 08:21:38 -0600 Subject: [PATCH] Mods --- cromulant/game.py | 71 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/cromulant/game.py b/cromulant/game.py index 3c4e9df..47d2c6e 100644 --- a/cromulant/game.py +++ b/cromulant/game.py @@ -22,16 +22,55 @@ from .settings import Settings class Method: merge = 0 + triumph = 1 hit = 2 + travel = 3 + thinking_1 = 4 thinking_2 = 5 + sentence_1 = 6 sentence_2 = 7 sentence_3 = 8 sentence_4 = 9 + @staticmethod + def opts_all() -> list[int]: + return [ + Method.triumph, + Method.hit, + Method.travel, + Method.thinking_1, + Method.thinking_2, + Method.sentence_1, + Method.sentence_2, + Method.sentence_3, + Method.sentence_4, + ] + + @staticmethod + def opts_score() -> list[int]: + return [Method.triumph, Method.hit] + + @staticmethod + def opts_travel() -> list[int]: + return [Method.travel] + + @staticmethod + def opts_thought() -> list[int]: + return [Method.thinking_1, Method.thinking_2] + + @staticmethod + def opts_words() -> list[int]: + return [ + Method.sentence_1, + Method.sentence_2, + Method.sentence_3, + Method.sentence_4, + ] + class Game: timer: QTimer | None = None @@ -201,33 +240,19 @@ class Game: opts: list[int] if mode == "all": - opts = [ - Method.triumph, - Method.hit, - Method.travel, - Method.thinking_1, - Method.thinking_2, - Method.sentence_1, - Method.sentence_2, - Method.sentence_3, - Method.sentence_4, - Method.sentence_4 + 1, - Method.sentence_4 + 2, - Method.sentence_4 + 3, - ] + opts = Method.opts_all() + # Make sentence more probable + opts.extend([101, 102]) elif mode == "score": - opts = [Method.triumph, Method.hit] + opts = Method.opts_score() elif mode == "travel": - opts = [Method.travel] + opts = Method.opts_travel() elif mode == "thought": - opts = [Method.thinking_1, Method.thinking_2] + opts = Method.opts_thought() elif mode == "words": - opts = [ - Method.sentence_1, - Method.sentence_2, - Method.sentence_3, - Method.sentence_4, - ] + opts = Method.opts_words() + else: + return Game.merge_charge += 1