From 7d9dd06d09f18352670af52cc2c1cb03c75ca081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sat, 25 Apr 2020 23:19:41 +0200 Subject: [PATCH] Add import new class in Game.py --- src/game/EventManager.py | 2 -- src/game/Game.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/EventManager.py b/src/game/EventManager.py index 312d4af..066b81e 100644 --- a/src/game/EventManager.py +++ b/src/game/EventManager.py @@ -86,10 +86,8 @@ class EventManager: # TODO: Collision ckecks self.player.move(Movement.FORWARD) if keys[pygame.K_a]: - # TODO: Collision ckecks self.player.move(Movement.ROTATE_L) if keys[pygame.K_d]: - # TODO: Collision ckecks self.player.move(Movement.ROTATE_R) diff --git a/src/game/Game.py b/src/game/Game.py index 2d2e3bb..73e7c47 100644 --- a/src/game/Game.py +++ b/src/game/Game.py @@ -3,6 +3,7 @@ import json from pathlib import Path from os import path +from src.AI.AutomaticMovement import AutomaticMovement from src.game.EventManager import EventManager from src.game.Screen import Screen from src.game.Map import Map @@ -53,6 +54,8 @@ class Game: self.map.addEntity(self.player) self.eventManager = EventManager(self, self.player) + self.movement = AutomaticMovement(self.player, self.map) + self.mainLoop() def mainLoop(self):