Add Q for quit.

This commit is contained in:
Dag-Erling Smørgrav 2021-10-18 13:25:25 +02:00
parent d08825f98d
commit 34445c7540

View file

@ -40,6 +40,9 @@ void Game::processEvents(InputState & inputState) {
if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) {
inputState.enableAI = !inputState.enableAI;
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Q)) {
exit(0);
}
inputState.down = sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Down);
inputState.up = sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up);