diff --git a/Interface/grid_draw.py b/Interface/grid_draw.py index ab878a2..5335dee 100644 --- a/Interface/grid_draw.py +++ b/Interface/grid_draw.py @@ -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, color=None): + def circle(self, x, y, radius, color=None): pygame.draw.circle( - self.screen, color, (x, y), 20 + self.screen, color, (x, y), radius ) # TODO calculate radius (now 20) in terms of window size. diff --git a/Interface/vacuum_render.py b/Interface/vacuum_render.py index 7de34a4..b5007fe 100644 --- a/Interface/vacuum_render.py +++ b/Interface/vacuum_render.py @@ -16,18 +16,19 @@ 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 = 20 + radius = tile_height/3 # 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, color=Colors.RED) + grid.circle(x, y, radius, color=Colors.RED) grid.end_draw() pygame.time.delay(10)