test/snake/snake.c

changeset 249
2522fbeccede
parent 248
793a0108c6c4
equal deleted inserted replaced
248:793a0108c6c4 249:2522fbeccede
478 asc_clear_error(); 478 asc_clear_error();
479 asc_context_quit(); 479 asc_context_quit();
480 } 480 }
481 481
482 // player rotation 482 // player rotation
483 // TODO: queue up to two movement commands (for sharp 90° turns)
484 if (asc_key_pressed(ASC_KEY(LEFT))) { 483 if (asc_key_pressed(ASC_KEY(LEFT))) {
485 if (player->direction != MOVE_RIGHT) { 484 if (player->direction != MOVE_RIGHT) {
486 player->target_direction = MOVE_LEFT; 485 player->target_direction = MOVE_LEFT;
487 } 486 }
488 } 487 }

mercurial