This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
GGS/games/tic-tac-toe/input.py

23 lines
457 B
Python

#Input.py
#Variables: Key_Id[Int,String], KeyBehaviour[enum], Action[method]
#Methods: update() Param nothing,
#Behaviour
#in update. when called. takes the state of the key. compares with the behaviour.
#if fullfilled perform action.
#All Input instances have an id.
class Input(object):
id = -1
fun = None
def __init__(self, id, fun):
self.id = id
self.fun = fun
def notify(self):
pass
def update(self,state):
pass