#ifndef HOLESOME_INPUT_MAPPER_H #define HOLESOME_INPUT_MAPPER_H #include "../game.h" #include #include "../../config.h" #include "direction.h" class Game; /** * Maps the inputs to actions. */ class InputMapper { public: static void setGame(Game *game); static void processEvents(); static Direction getInputDirection(); private: static inline Game *game = nullptr; static inline std::vector inputDirectionBuffer = std::vector(); static void handleKeyPress(sf::Event::KeyEvent event); static void handleKeyRelease(sf::Event::KeyEvent event); }; #endif //HOLESOME_INPUT_MAPPER_H