Mods
This commit is contained in:
parent
0598722153
commit
69b32fd4fd
|
@ -22,6 +22,7 @@ from .settings import Settings
|
||||||
class Game:
|
class Game:
|
||||||
timer: QTimer | None = None
|
timer: QTimer | None = None
|
||||||
playing_song: bool = False
|
playing_song: bool = False
|
||||||
|
last_update: int = 0
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def prepare() -> None:
|
def prepare() -> None:
|
||||||
|
@ -154,14 +155,21 @@ class Game:
|
||||||
if not ant:
|
if not ant:
|
||||||
return
|
return
|
||||||
|
|
||||||
num = random.randint(0, 12)
|
min_num = 0
|
||||||
|
max_num = 12
|
||||||
|
|
||||||
if num == 0:
|
num = random.randint(min_num, max_num)
|
||||||
|
|
||||||
|
if num == min_num:
|
||||||
|
if Game.last_update == min_num:
|
||||||
|
num = max_num
|
||||||
|
else:
|
||||||
Ants.merge()
|
Ants.merge()
|
||||||
return
|
return
|
||||||
|
|
||||||
status = ""
|
status = ""
|
||||||
method = "normal"
|
method = "normal"
|
||||||
|
Game.last_update = num
|
||||||
|
|
||||||
if num == 1:
|
if num == 1:
|
||||||
ant.triumph += 1
|
ant.triumph += 1
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Utils:
|
||||||
Utils.rand_sentence = RandomSentence()
|
Utils.rand_sentence = RandomSentence()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def now() -> float:
|
def now() -> int:
|
||||||
return int(time.time())
|
return int(time.time())
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue