Spiel.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int spielzugpruefung(int staebe[3][4], int usereingaben[]){
  5. int x = 0;
  6. int temp[2];
  7. return x;
  8. }
  9. void druck(int staebe[3][4]){
  10. cout <<"A";
  11. string labels[4] = {" || " , " <==> ", " <====> ", " <======>"};
  12. for(int x = 3; x >= 0; x--){
  13. for(int y = 0; y < 3; y++){
  14. cout << labels[staebe[y][x]];
  15. }
  16. cout << endl;
  17. }
  18. }
  19. int main(){
  20. bool run;
  21. int usereingaben[2];
  22. int staebe[3][4];
  23. staebe[0][0] = 3;
  24. staebe[0][1] = 2;
  25. staebe[0][2] = 1;
  26. staebe[0][3] = 0;
  27. for(int x = 0; x < 2; x++){
  28. for(int y = 0; y < 4; y++){
  29. staebe[x][y] = 0;
  30. }
  31. }
  32. druck(staebe);
  33. do{
  34. for(int x = 0; x < 2; x++){
  35. run = true;
  36. do{
  37. cin >> usereingaben[x];
  38. if(usereingaben[x] < 4 && usereingaben[x] > 0){
  39. run = false;
  40. }
  41. else{
  42. cout << "ERROR" <<endl;
  43. }
  44. }while(run);
  45. }
  46. run = spielzugpruefung(staebe, usereingaben);
  47. if(run){
  48. cout << "Erfolgreich" << endl;
  49. }
  50. else{
  51. cout << "ERROR.."<< endl;
  52. }
  53. }while(run == false);
  54. }