basic_agent
This commit is contained in:
parent
dcd0a6e06d
commit
47018b05d9
6
main.py
6
main.py
@ -12,7 +12,7 @@ display = pygame.display.set_mode((DISPLAY_SIZE_HORIZONTAL, DISPLAY_SIZE_VERTICA
|
||||
# program name
|
||||
pygame.display.set_caption('Tryryryry')
|
||||
|
||||
game_over = False
|
||||
working = True
|
||||
|
||||
tractor_horizontal_location = TRACTOR_HORIZONTAL_LOCATION
|
||||
tractor_vertical_location = TRACTOR_VERTICAL_LOCATION
|
||||
@ -25,10 +25,10 @@ board = Board.generate()
|
||||
color = BLACK
|
||||
clock = pygame.time.Clock()
|
||||
|
||||
while not game_over:
|
||||
while working:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
game_over = True
|
||||
working = False
|
||||
if event.type == pygame.KEYDOWN:
|
||||
print(tractor_horizontal_location, " ", tractor_vertical_location)
|
||||
if event.key == pygame.K_LEFT and tractor_horizontal_location > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user