From bbf549c0241fe58bd7b23ba3b19fb176acf7247b Mon Sep 17 00:00:00 2001 From: Nicholas Dyer Date: Thu, 11 May 2023 14:08:22 -0400 Subject: [PATCH] moved around structure --- pocket_friends/development/button_test.py | 2 +- pocket_friends/development/dev_menu.py | 4 ++-- .../FakeGPIO.py => game_files/io_helpers/fake_gpio.py} | 0 .../{hardware => game_files/io_helpers}/gpio_handler.py | 2 +- pocket_friends/game_files/io_helpers/input_handler.py | 4 ++-- pocket_friends/game_files/surfaces/egg_select.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename pocket_friends/{development/FakeGPIO.py => game_files/io_helpers/fake_gpio.py} (100%) rename pocket_friends/{hardware => game_files/io_helpers}/gpio_handler.py (97%) diff --git a/pocket_friends/development/button_test.py b/pocket_friends/development/button_test.py index f9c7ee5..43d1cc1 100644 --- a/pocket_friends/development/button_test.py +++ b/pocket_friends/development/button_test.py @@ -2,7 +2,7 @@ Module to test the GPIO input on the Raspberry Pi. """ from collections import deque -from ..hardware.gpio_handler import Constants, GPIOHandler +from pocket_friends.game_files.io_helpers.gpio_handler import Constants, GPIOHandler def button_test(): diff --git a/pocket_friends/development/dev_menu.py b/pocket_friends/development/dev_menu.py index 24e2fe4..e390769 100644 --- a/pocket_friends/development/dev_menu.py +++ b/pocket_friends/development/dev_menu.py @@ -8,13 +8,13 @@ import pygame import time from .button_test import button_test from .menus import Menu -from ..hardware.gpio_handler import GPIOHandler, Constants +from pocket_friends.game_files.io_helpers.gpio_handler import GPIOHandler, Constants try: importlib.util.find_spec('RPi.GPIO') import RPi.GPIO as GPIO except ImportError: - import pocket_friends.development.FakeGPIO as GPIO + import pocket_friends.game_files.io_helpers.fake_gpio as GPIO # Global variable to keep track of the current menu. menu = 'main' diff --git a/pocket_friends/development/FakeGPIO.py b/pocket_friends/game_files/io_helpers/fake_gpio.py similarity index 100% rename from pocket_friends/development/FakeGPIO.py rename to pocket_friends/game_files/io_helpers/fake_gpio.py diff --git a/pocket_friends/hardware/gpio_handler.py b/pocket_friends/game_files/io_helpers/gpio_handler.py similarity index 97% rename from pocket_friends/hardware/gpio_handler.py rename to pocket_friends/game_files/io_helpers/gpio_handler.py index fd1ddd1..7e842c0 100644 --- a/pocket_friends/hardware/gpio_handler.py +++ b/pocket_friends/game_files/io_helpers/gpio_handler.py @@ -8,7 +8,7 @@ try: importlib.util.find_spec('RPi.GPIO') import RPi.GPIO as GPIO except ImportError: - import pocket_friends.development.FakeGPIO as GPIO + import pocket_friends.game_files.io_helpers.fake_gpio as GPIO class Constants: diff --git a/pocket_friends/game_files/io_helpers/input_handler.py b/pocket_friends/game_files/io_helpers/input_handler.py index 97afc25..4509c29 100644 --- a/pocket_friends/game_files/io_helpers/input_handler.py +++ b/pocket_friends/game_files/io_helpers/input_handler.py @@ -1,6 +1,6 @@ import pygame import importlib.util -from pocket_friends.hardware.gpio_handler import Constants, GPIOHandler +from pocket_friends.game_files.io_helpers.gpio_handler import Constants, GPIOHandler class InputHandler: @@ -11,7 +11,7 @@ class InputHandler: import RPi.GPIO as GPIO self.on_hardware = True except ImportError: - import pocket_friends.development.FakeGPIO as GPIO + import pocket_friends.game_files.io_helpers.fake_gpio as GPIO self.on_hardware = False self.last_input_tick = 0 diff --git a/pocket_friends/game_files/surfaces/egg_select.py b/pocket_friends/game_files/surfaces/egg_select.py index 2fadf3f..8fde4ad 100644 --- a/pocket_friends/game_files/surfaces/egg_select.py +++ b/pocket_friends/game_files/surfaces/egg_select.py @@ -1,6 +1,6 @@ import pygame from . import sprites -from pocket_friends.hardware.gpio_handler import Constants +from pocket_friends.game_files.io_helpers.gpio_handler import Constants from ..io_helpers.input_handler import InputHandler