1 Commits
Author SHA1 Message Date
odweta f367ef48a8 add arrow support to 2048 2026-10-10 14:02:50 +02:00
+4
View File
@@ -284,18 +284,22 @@ client_poll_event(void)
game_state->is_running = false;
break;
case SDLK_W:
case SDLK_UP:
if (game_status == GAME_PLAYING)
slide(UP);
break;
case SDLK_S:
case SDLK_DOWN:
if (game_status == GAME_PLAYING)
slide(DOWN);
break;
case SDLK_A:
case SDLK_LEFT:
if (game_status == GAME_PLAYING)
slide(LEFT);
break;
case SDLK_D:
case SDLK_RIGHT:
if (game_status == GAME_PLAYING)
slide(RIGHT);
break;