Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- while (true)
- {
- if (_kbhit()) // ENTRA AL IF CUANDO SE PRESIONA UNA TECLA
- {
- tecla = _getch();
- switch (tecla)
- {
- case DERECHA:
- {
- // MOVIMIENTO A LA DER
- break;
- }
- case IZQUIERDA:
- {
- // MOVIMIENTO A LA IZQ
- break;
- }
- case ESC:
- {
- exit(0);
- break;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement