Skip to content

Commit

Permalink
Set execution without physical build as default
Browse files Browse the repository at this point in the history
  • Loading branch information
timwedde committed Jun 16, 2017
1 parent 3f5d78e commit 1e3cd89
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions antificial/image_recognition/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
XMIDDLE = (XMAX-XMIN)/2
YMIN = 28.5
YMAX = 514.5
SHOW_DEBUG_WINDOWS = True
DEBUG_BALLS_ONLY = False
SHOW_DEBUG_WINDOWS = False
DEBUG_BALLS_ONLY = True

class Settings(object):
DP = 2
Expand Down
25 changes: 13 additions & 12 deletions antificial/renderer/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# TODO: replace this with push through queue?
from framework import handler

PROJECTOR_MODE = True
PROJECTOR_MODE = False

from kivy.config import Config
Config.set("kivy", "log_level", "warning") # one of: trace, debug, info, warning, error, critical
Expand Down Expand Up @@ -231,17 +231,18 @@ def update(self, dt):
self.cells[x][y_inverted].children[0].rgba = [0, 1, 0, food_pheromone_level / 255 * ALPHA_DAMPEN]
if ant_count > 0:
self.cells[x][y_inverted].children[0].rgb = [1, 1, 1]

#for player_index in range(PLAYER_COUNT):
# food_level = WORLD_DATA[i + 4 + player_index]
# if food_level > 0:
# has_food = True
# if player_index == 0:
# self.cells[x][y_inverted].children[0].rgba = [1, 0, 0, food_level / 255]
# elif player_index == 1:
# self.cells[x][y_inverted].children[0].rgba = [0, 1, 0, food_level / 510]
# else:
# self.cells[x][y_inverted].children[0].rgba = [0, 0, 1, food_level / 255]

if not PROJECTOR_MODE:
for player_index in range(PLAYER_COUNT):
food_level = WORLD_DATA[i + 4 + player_index]
if food_level > 0:
has_food = True
if player_index == 0:
self.cells[x][y_inverted].children[0].rgba = [1, 0, 0, food_level / 255]
elif player_index == 1:
self.cells[x][y_inverted].children[0].rgba = [0, 1, 0, food_level / 510]
else:
self.cells[x][y_inverted].children[0].rgba = [0, 0, 1, food_level / 255]
nest_x = nest_coordinates[0]
nest_y = nest_coordinates[1]
if nest_coordinates != (0,0):
Expand Down

0 comments on commit 1e3cd89

Please sign in to comment.