Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <stdio.h>
- #include <time.h>
- #include <cstdlib>
- #include <windows.h>
- #include <conio.h>
- #include <ctime>
- #include <unistd.h>
- using namespace std;
- int main(){
- char campo_di_gioco = {
- };
- int p = 2;
- while(1){
- cout<<p<<navetta<<endl;
- if (GetAsyncKeyState(VK_LEFT)){
- if (p-1>=0){
- navetta[p]=*" ";
- p--;
- navetta[p]=*"^";
- }
- }
- if (GetAsyncKeyState(VK_RIGHT)){
- if (p<4){
- navetta[p]=*" ";
- p++;
- navetta[p]=*"^";
- }
- }
- usleep(1000);
- system("cls");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement