Delete import non existing file
This commit is contained in:
parent
83ef0fecad
commit
047ef87bab
18
main.py
18
main.py
@ -2,7 +2,6 @@ from random import randint
|
|||||||
|
|
||||||
import pygame
|
import pygame
|
||||||
|
|
||||||
from Interface.vacuum_render import initial_draw
|
|
||||||
from domain.commands.random_cat_move_command import RandomCatMoveCommand
|
from domain.commands.random_cat_move_command import RandomCatMoveCommand
|
||||||
from domain.commands.vacuum_move_command import VacuumMoveCommand
|
from domain.commands.vacuum_move_command import VacuumMoveCommand
|
||||||
from domain.entities.cat import Cat
|
from domain.entities.cat import Cat
|
||||||
@ -14,6 +13,7 @@ from view.renderer import Renderer
|
|||||||
|
|
||||||
# initial_draw(500, 10)
|
# initial_draw(500, 10)
|
||||||
|
|
||||||
|
|
||||||
class Main:
|
class Main:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
tiles_x = 10
|
tiles_x = 10
|
||||||
@ -44,13 +44,21 @@ class Main:
|
|||||||
self.running = False
|
self.running = False
|
||||||
if event.type == pygame.KEYDOWN:
|
if event.type == pygame.KEYDOWN:
|
||||||
if event.key == pygame.K_LEFT:
|
if event.key == pygame.K_LEFT:
|
||||||
self.commands.append(VacuumMoveCommand(self.world, self.world.vacuum, (-1, 0)))
|
self.commands.append(
|
||||||
|
VacuumMoveCommand(self.world, self.world.vacuum, (-1, 0))
|
||||||
|
)
|
||||||
if event.key == pygame.K_RIGHT:
|
if event.key == pygame.K_RIGHT:
|
||||||
self.commands.append(VacuumMoveCommand(self.world, self.world.vacuum, (1, 0)))
|
self.commands.append(
|
||||||
|
VacuumMoveCommand(self.world, self.world.vacuum, (1, 0))
|
||||||
|
)
|
||||||
if event.key == pygame.K_UP:
|
if event.key == pygame.K_UP:
|
||||||
self.commands.append(VacuumMoveCommand(self.world, self.world.vacuum, (0, -1)))
|
self.commands.append(
|
||||||
|
VacuumMoveCommand(self.world, self.world.vacuum, (0, -1))
|
||||||
|
)
|
||||||
if event.key == pygame.K_DOWN:
|
if event.key == pygame.K_DOWN:
|
||||||
self.commands.append(VacuumMoveCommand(self.world, self.world.vacuum, (0, 1)))
|
self.commands.append(
|
||||||
|
VacuumMoveCommand(self.world, self.world.vacuum, (0, 1))
|
||||||
|
)
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
self.commands.append(RandomCatMoveCommand(self.world, self.world.cat))
|
self.commands.append(RandomCatMoveCommand(self.world, self.world.cat))
|
||||||
|
Loading…
Reference in New Issue
Block a user