diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-08 17:53:17 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-08 22:05:55 +0100 |
commit | 1fe19d3e589bbc5d40b74d007d6b1984cfc34925 (patch) | |
tree | 11e63c628f5b8adc4f5711f02e98d555c572fe48 /cameltris.py | |
parent | c51fd84bc896c74f291b4c5f2c73b5e5852de3e5 (diff) |
Make controller classes and screen classes inherit from abstract classes
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'cameltris.py')
-rwxr-xr-x | cameltris.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cameltris.py b/cameltris.py index b454db2..50ebb01 100755 --- a/cameltris.py +++ b/cameltris.py @@ -4,7 +4,8 @@ import argparse import pygame -from pycameltris.controller import KeyboardController, JoystickController +from pycameltris.controller import Controller, KeyboardController, JoystickController +from pycameltris.screens.Screen import Screen from pycameltris.screens.InGame import InGame as InGameScreen, Player from pycameltris.screens.Pause import Pause as PauseScreen from pycameltris.misc import Pause, UnPause @@ -23,6 +24,7 @@ pygame.init() screen = pygame.display.set_mode((801, 1000)) +controller: Controller if ARGS["joystick_id"] is not None: joystick = pygame.joystick.Joystick(ARGS["joystick_id"]) joystick.init() @@ -38,6 +40,7 @@ for player in players: clock = pygame.time.Clock() +current_screen: Screen current_screen = ingame_screen = InGameScreen(players, screen) while True: |