direction GetDirection() { if ((KeyUp | KeyW).pressed()) { return UP; } else if ((KeyLeft | KeyA).pressed()) { return LEFT; } else if ((KeyDown | KeyS).pressed()) { return DOWN; } else if ((KeyRight | KeyD).pressed()) { return RIGHT; } else return NONE; }