diff options
author | Florian Jung <flo@windfisch.org> | 2015-08-18 03:03:49 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-08-18 03:03:49 +0200 |
commit | 1569546ada9cdb0ff776908b008335dc95d853ab (patch) | |
tree | c740bd8d7257970b4dc7008538a49e1aec158544 /main.py | |
parent | ecdfcf48607ab9a382695dd0cdbdaada5d731762 (diff) |
pathfinding works \o/
it's still horribly slow (2 seconds calculation time), and atm it only
weighs every cell with a really large cost (so it avoids basically
everything). BUT HEY IT F***ING WORKS \o/
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,7 +11,7 @@ import gui import stats from subscriber import DummySubscriber from interval_utils import * -from strategy import * +from pathfinding import PathfindingTesterStrategy # global vars sub = DummySubscriber() @@ -37,7 +37,7 @@ c.player.nick="test cell pls ignore" gui.set_client(c) # initialize strategy -strategy = Strategy(c) +strategy = PathfindingTesterStrategy(c) # main loop while True: @@ -48,9 +48,9 @@ while True: if len(list(c.player.own_cells)) > 0: target = strategy.process_frame() - if gui.bot_input: + if gui.bot_input and target != None: c.send_target(target[0], target[1]) stats.log_pos(c.player.center) stats.log_mass(c.player.total_mass) - gui.update()
\ No newline at end of file + gui.update() |