optimization #5

Merged
s473555 merged 6 commits from optimization into main 2023-03-16 22:13:59 +01:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 9b7bb1a62c - Show all commits

View File

@ -2,7 +2,7 @@ import pygame
import sys
def moving_cleaner(grid_width, grid_height, tile_width, tile_height, x, y):
def robot_movement(grid_width, grid_height, tile_width, tile_height, x, y):
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()

View File

@ -1,7 +1,7 @@
from Interface.grid_draw import GridDraw, Colors
import sys
import pygame
from Interface.movement import moving_cleaner
from Interface.movement import robot_movement
def initial_draw(grid_dimensions, board_size):
@ -27,7 +27,7 @@ def initial_draw(grid_dimensions, board_size):
while True:
grid.start_draw()
grid.board(board_size, board_size)
(x, y) = moving_cleaner(grid_width, grid_height, tile_width, tile_height, x, y)
(x, y) = robot_movement(grid_width, grid_height, tile_width, tile_height, x, y)
grid.circle(x, y, color=Colors.RED)
grid.end_draw()
pygame.time.delay(10)