diff --git a/pocket_friends.py b/pocket_friends.py index 3ee8203..6b123d7 100644 --- a/pocket_friends.py +++ b/pocket_friends.py @@ -3,8 +3,8 @@ Launch script for Pocket Friends. """ import pygame import sys -from data.game import main as game_main -from data.development.dev_menu import main as dev_menu_main +from pocket_friends.game import main as game_main +from pocket_friends.development.dev_menu import main as dev_menu_main enable_dev = False diff --git a/data/__init__.py b/pocket_friends/__init__.py similarity index 100% rename from data/__init__.py rename to pocket_friends/__init__.py diff --git a/data/development/FakeGPIO.py b/pocket_friends/development/FakeGPIO.py similarity index 100% rename from data/development/FakeGPIO.py rename to pocket_friends/development/FakeGPIO.py diff --git a/data/development/__init__.py b/pocket_friends/development/__init__.py similarity index 100% rename from data/development/__init__.py rename to pocket_friends/development/__init__.py diff --git a/data/development/button_test.py b/pocket_friends/development/button_test.py similarity index 100% rename from data/development/button_test.py rename to pocket_friends/development/button_test.py diff --git a/data/development/dev_menu.py b/pocket_friends/development/dev_menu.py similarity index 95% rename from data/development/dev_menu.py rename to pocket_friends/development/dev_menu.py index 916f663..3c9b35b 100644 --- a/data/development/dev_menu.py +++ b/pocket_friends/development/dev_menu.py @@ -1,7 +1,7 @@ """ Development menu for the game on Raspberry Pi. NOTE: THIS DOES NOTHING ON A COMPUTER! """ -import data.game +import pocket_friends.game import importlib.util import os import pygame @@ -16,7 +16,7 @@ try: importlib.util.find_spec('RPi.GPIO') import RPi.GPIO as GPIO except ImportError: - import data.development.FakeGPIO as GPIO + import pocket_friends.development.FakeGPIO as GPIO # Global variable to keep track of the current menu. menu = 'main' @@ -43,7 +43,7 @@ def start_game(): Cleans the GPIO and starts the game. """ GPIOHandler.teardown() - data.game.main() + pocket_friends.game.main() pygame.quit() GPIOHandler.setup() @@ -95,7 +95,7 @@ def main(): # The following defines all of the options in the various different menus. - main_menu = Menu('Pocket Friends Dev Menu {0}\nGame Version {1}'.format(dev_version, data.game.version)) + main_menu = Menu('Pocket Friends Dev Menu {0}\nGame Version {1}'.format(dev_version, pocket_friends.game.version)) main_menu.add_option(Menu.Option('Start Game', start_game)) main_menu.add_option(Menu.Option('Button Test', run_button_test)) main_menu.add_option(Menu.Option('Restart Dev Menu', quit_with_error)) diff --git a/data/development/menus.py b/pocket_friends/development/menus.py similarity index 100% rename from data/development/menus.py rename to pocket_friends/development/menus.py diff --git a/data/game.py b/pocket_friends/game.py similarity index 99% rename from data/game.py rename to pocket_friends/game.py index b45bbba..ca1614b 100644 --- a/data/game.py +++ b/pocket_friends/game.py @@ -108,7 +108,7 @@ try: importlib.util.find_spec('RPi.GPIO') import RPi.GPIO as GPIO except ImportError: - import data.development.FakeGPIO as GPIO + import pocket_friends.development.FakeGPIO as GPIO def game(): diff --git a/data/gpio_handler.py b/pocket_friends/gpio_handler.py similarity index 97% rename from data/gpio_handler.py rename to pocket_friends/gpio_handler.py index 185df5a..f8cd603 100644 --- a/data/gpio_handler.py +++ b/pocket_friends/gpio_handler.py @@ -8,7 +8,7 @@ try: importlib.util.find_spec('RPi.GPIO') import RPi.GPIO as GPIO except ImportError: - import data.development.FakeGPIO as GPIO + import pocket_friends.development.FakeGPIO as GPIO class Constants: