From 16bb2cd311b5ddbcb8b6fc99cac01d52f8a5d836 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sun, 10 May 2020 14:25:30 +0200 Subject: [PATCH] Cleanup --- src/game/Game.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/game/Game.py b/src/game/Game.py index 5186e74..4763ca8 100644 --- a/src/game/Game.py +++ b/src/game/Game.py @@ -1,14 +1,14 @@ -import pygame import json -from pathlib import Path from os import path +from pathlib import Path + +import pygame from src.AI.AutomaticMovement import AutomaticMovement -from src.game.EventManager import EventManager -from src.game.Screen import Screen, Locations -from src.game.Map import Map - from src.entities.Player import Player +from src.game.EventManager import EventManager +from src.game.Map import Map +from src.game.Screen import Screen, Locations from src.game.Timer import Timer @@ -42,7 +42,6 @@ class Game: print("The screen cannot be in a vertical orientation. Exiting...") exit(1) - # Initialize timers # PyGame timer - precise timer, counts milliseconds every frame self.pgTimer = pygame.time.Clock() @@ -54,9 +53,6 @@ class Game: self.screen = Screen(self, self.config["window"]) print("OK") - self.deltaTime = 0 - self.lastTimePassed = self.ingameTimer.timePassed - self.moveTimer = 0 self.moveTime = 100 @@ -93,9 +89,6 @@ class Game: # Tick the timers self.ingameTimer.updateTime(self.pgTimer.tick()) - self.deltaTime = self.ingameTimer.timePassed - self.lastTimePassed - self.lastTimePassed = self.ingameTimer.timePassed - # Handle all events self.eventManager.handleEvents()