Advertisement
LiMIllusion

Untitled

Dec 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <string>
  2. #include <iostream>
  3. #include <stdio.h>
  4. #include <time.h>
  5. #include <cstdlib>
  6. #include <windows.h>
  7. #include <conio.h>
  8. #include <ctime>
  9. #include <unistd.h>
  10.  
  11. using namespace std;
  12.  
  13. int main(){
  14. char campo_di_gioco = {
  15.  
  16. };
  17. int p = 2;
  18. while(1){
  19.  
  20. cout<<p<<navetta<<endl;
  21. if (GetAsyncKeyState(VK_LEFT)){
  22. if (p-1>=0){
  23. navetta[p]=*" ";
  24. p--;
  25. navetta[p]=*"^";
  26. }
  27. }
  28. if (GetAsyncKeyState(VK_RIGHT)){
  29. if (p<4){
  30. navetta[p]=*" ";
  31. p++;
  32. navetta[p]=*"^";
  33. }
  34. }
  35.  
  36. usleep(1000);
  37. system("cls");
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement