Added gamepad movement. /JL
This commit is contained in:
33
pygameController/controlsbase.py
Normal file
33
pygameController/controlsbase.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""
|
||||
This is an abstract baseclass for the controls of snake.
|
||||
"""
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
class ControlsBase(ABC):
|
||||
@abstractmethod
|
||||
def handle_input(self, event):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def left(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def right(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def up(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def down(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def pause(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def rumble(self):
|
||||
pass
|
Reference in New Issue
Block a user