diff --git a/assets/jc_icon.png b/assets/icons/jc_icon.png similarity index 100% rename from assets/jc_icon.png rename to assets/icons/jc_icon.png diff --git a/assets/jorcademy.png b/assets/icons/jorcademy.png similarity index 100% rename from assets/jorcademy.png rename to assets/icons/jorcademy.png diff --git a/engine.py b/engine/engine.py similarity index 97% rename from engine.py rename to engine/engine.py index 27fe636..61dc5b2 100644 --- a/engine.py +++ b/engine/engine.py @@ -4,7 +4,7 @@ import jorcademy as jc # Set app icon -pygame_icon = pygame.image.load('assets/jc_icon.png') +pygame_icon = pygame.image.load('./assets/icons/jc_icon.png') pygame.display.set_icon(pygame_icon) # Init user setup @@ -20,7 +20,7 @@ # Render objects in draw buffer def render_objects_on_screen() -> None: for obj in jc.draw_buffer: - obj.draw(screen) + obj.update(screen) # === Keyboard input === # @@ -142,7 +142,7 @@ def handle_mouse_input(event_args: pygame.event): screen.fill(jc.background_color) # Render game - game.draw() + game.update() render_objects_on_screen() # flip() the display to put your work on screen diff --git a/jorcademy.py b/engine/jorcademy.py similarity index 95% rename from jorcademy.py rename to engine/jorcademy.py index 47fbc45..da1d1d1 100644 --- a/jorcademy.py +++ b/engine/jorcademy.py @@ -57,7 +57,7 @@ def title(t: str) -> None: # Change app icon def icon(name: str) -> None: - app_icon = pygame.image.load("assets/" + name) + app_icon = pygame.image.load("./assets/" + name) pygame.display.set_icon(app_icon) @@ -104,7 +104,7 @@ def load_sound(path: str): # Play audio def play_sound(audio_obj: Audio): - sound = pygame.mixer.Sound("assets/" + audio_obj.filepath) + sound = pygame.mixer.Sound("./assets/" + audio_obj.filepath) if not pygame.mixer.Channel(audio_obj.channel).get_busy(): pygame.mixer.Channel(audio_obj.channel).play(sound) diff --git a/primitives.py b/engine/primitives.py similarity index 100% rename from primitives.py rename to engine/primitives.py diff --git a/game.py b/game.py index 02bb781..286ad14 100644 --- a/game.py +++ b/game.py @@ -1,9 +1,6 @@ -from jorcademy import * - - def setup() -> None: pass -def draw() -> None: +def update() -> None: pass