Compare commits

..

No commits in common. "4ec034d548175e2984c15bfefb8c7d202d600704" and "ef2e1a1fb7273aa457bc4998f16130806bce240c" have entirely different histories.

2 changed files with 4 additions and 5 deletions

View File

@ -53,7 +53,7 @@ class GridDraw:
self.line(0, tiles_height * i, self.width, tiles_height * i, color=color)
@default_color
def circle(self, x, y, radius, color=None):
def circle(self, x, y, color=None):
pygame.draw.circle(
self.screen, color, (x, y), radius
self.screen, color, (x, y), 20
) # TODO calculate radius (now 20) in terms of window size.

View File

@ -16,19 +16,18 @@ def initial_draw(grid_dimensions, board_size):
grid_height = grid_dimensions
# FIXME @countingthedots: please tell me what is going on there and why???
#
grid = GridDraw(grid_width, grid_height)
tile_width = grid_width / board_size
tile_height = grid_height / board_size
x = tile_width / 2
y = tile_height / 2
radius = tile_height/3
radius = 20
# rendering loop
while True:
grid.start_draw()
grid.board(board_size, board_size)
(x, y) = robot_movement(grid_width, grid_height, tile_width, tile_height, x, y)
grid.circle(x, y, radius, color=Colors.RED)
grid.circle(x, y, color=Colors.RED)
grid.end_draw()
pygame.time.delay(10)