import asyncio
from networking.Networking import Networking


class InputHandler:
    def __init__(self, targets):
        self.isRunning = True
        self.targets = targets

    async def handleInputs(self):
        self.isRunning = True
        while self.isRunning:
            event = await Networking().getInputEvent()
            self.targets[event].hit() #Todo

    def stop(self):
        self.isRunning = False
