#include "input.h"

void Input::update()
{
    while (SDL_PollEvent(&event))
    {
        if (event.type == SDL_KEYDOWN)
        {
            activeKeys[event.key.keysym.sym] = true;
        }
        else if (event.type == SDL_KEYUP)
        {
            activeKeys.erase(event.key.keysym.sym);
        }
        else if (event.type == SDL_QUIT)
        {
            exit = true;
        }
    }
}