Compare commits
1
Commits
main
..
3c70f140dd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c70f140dd |
+1
-1
@@ -181,8 +181,8 @@ class Ants:
|
||||
ant.method = method
|
||||
ant.updated = Utils.now()
|
||||
|
||||
Ants.on_change()
|
||||
Game.update(ant)
|
||||
Ants.on_change()
|
||||
|
||||
@staticmethod
|
||||
def get() -> None:
|
||||
|
||||
@@ -29,12 +29,6 @@ class Args:
|
||||
score: bool = False
|
||||
mono: bool = False
|
||||
fade: bool = True
|
||||
weight_merge: int = 1
|
||||
weight_triumph: int = 2
|
||||
weight_hit: int = 2
|
||||
weight_travel: int = 2
|
||||
weight_think: int = 2
|
||||
weight_words: int = 4
|
||||
|
||||
@staticmethod
|
||||
def prepare() -> None:
|
||||
@@ -68,12 +62,6 @@ class Args:
|
||||
"argdoc",
|
||||
"score",
|
||||
"mono",
|
||||
"weight_merge",
|
||||
"weight_triumph",
|
||||
"weight_hit",
|
||||
"weight_travel",
|
||||
"weight_think",
|
||||
"weight_words",
|
||||
]
|
||||
|
||||
for n_item in normals:
|
||||
|
||||
@@ -43,10 +43,6 @@ class ArgSpec:
|
||||
ArgSpec.infos = []
|
||||
ArgSpec.add_arguments()
|
||||
|
||||
@staticmethod
|
||||
def weight_info(what: str) -> str:
|
||||
return f"The weight of the '{what}' method. The greater this value, the higher its chances of being selected"
|
||||
|
||||
@staticmethod
|
||||
def add_argument(key: str, info: str, **kwargs: Any) -> None:
|
||||
if key in ArgSpec.arguments:
|
||||
@@ -188,39 +184,3 @@ class ArgSpec:
|
||||
action="store_false",
|
||||
info="Don't apply a fade-in effect on new updates",
|
||||
)
|
||||
|
||||
ArgSpec.add_argument(
|
||||
"weight_merge",
|
||||
type=int,
|
||||
info=ArgSpec.weight_info("merge"),
|
||||
)
|
||||
|
||||
ArgSpec.add_argument(
|
||||
"weight_triumph",
|
||||
type=int,
|
||||
info=ArgSpec.weight_info("triumph"),
|
||||
)
|
||||
|
||||
ArgSpec.add_argument(
|
||||
"weight_hit",
|
||||
type=int,
|
||||
info=ArgSpec.weight_info("hit"),
|
||||
)
|
||||
|
||||
ArgSpec.add_argument(
|
||||
"weight_travel",
|
||||
type=int,
|
||||
info=ArgSpec.weight_info("travel"),
|
||||
)
|
||||
|
||||
ArgSpec.add_argument(
|
||||
"weight_think",
|
||||
type=int,
|
||||
info=ArgSpec.weight_info("think"),
|
||||
)
|
||||
|
||||
ArgSpec.add_argument(
|
||||
"weight_words",
|
||||
type=int,
|
||||
info=ArgSpec.weight_info("words"),
|
||||
)
|
||||
|
||||
+6
-19
@@ -52,23 +52,12 @@ class Opt:
|
||||
|
||||
|
||||
class Opts:
|
||||
merge: Opt
|
||||
triumph: Opt
|
||||
hit: Opt
|
||||
travel: Opt
|
||||
think: Opt
|
||||
words: Opt
|
||||
|
||||
@staticmethod
|
||||
def prepare() -> None:
|
||||
from .args import Args
|
||||
|
||||
Opts.merge = Opt(Args.weight_merge, Method.merge)
|
||||
Opts.triumph = Opt(Args.weight_triumph, Method.triumph)
|
||||
Opts.hit = Opt(Args.weight_hit, Method.hit)
|
||||
Opts.travel = Opt(Args.weight_travel, Method.travel)
|
||||
Opts.think = Opt(Args.weight_think, Method.think)
|
||||
Opts.words = Opt(Args.weight_words, Method.words)
|
||||
merge = Opt(1, Method.merge)
|
||||
triumph = Opt(2, Method.triumph)
|
||||
hit = Opt(2, Method.hit)
|
||||
travel = Opt(2, Method.travel)
|
||||
think = Opt(2, Method.think)
|
||||
words = Opt(4, Method.words)
|
||||
|
||||
@staticmethod
|
||||
def opts_score() -> list[Opt]:
|
||||
@@ -97,7 +86,6 @@ class Game:
|
||||
|
||||
@staticmethod
|
||||
def prepare() -> None:
|
||||
Opts.prepare()
|
||||
Game.timer = QTimer()
|
||||
Game.timer.timeout.connect(Game.get_status)
|
||||
|
||||
@@ -460,7 +448,6 @@ class Game:
|
||||
|
||||
Game.started = False
|
||||
Game.timer.stop()
|
||||
Game.merge_charge = 0
|
||||
Window.clear_view()
|
||||
Ants.populate(size)
|
||||
Window.to_top()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "6.0.0",
|
||||
"version": "4.2.0",
|
||||
"title": "Cromulant",
|
||||
"program": "cromulant",
|
||||
"author": "madprops",
|
||||
|
||||
Reference in New Issue
Block a user