diff --git a/labygui.py b/labygui.py index 91fb1d7..332959b 100644 --- a/labygui.py +++ b/labygui.py @@ -127,9 +127,9 @@ def draw_path(): y = 16 canvas.create_text(4 + (i % 12) * 80, screen_h + 4 + y, anchor = NW, text = '(%5.2f, %3.1f)' % path[i], fill = color) -def draw_score(score): +def draw_score(state): global canvas - canvas.create_text(4, screen_h + 52, anchor = NW, text = 'score: %f' % score, fill = 'black') + canvas.create_text(4, screen_h + 52, anchor = NW, text = 'score: %f (state[6]: %5.1f, state[7]: %5.1f)' % (state[5], state[6], state[7]), fill = 'black') def fix_angle(a): return a * 2 * asin(1) / pi @@ -201,7 +201,7 @@ def aller_selon(path): state[5] += sin(fix_angle(state[7])) - state[6] // 2 draw_help() draw_path() - draw_score(state[5]) + draw_score(state) aller_selon(path)