Advertisement
erzis

Untitled

Oct 25th, 2016
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.21 KB | None | 0 0
  1. //Game is made by Erzis
  2. //All rights reserved
  3.  
  4.  
  5. #include <iostream>
  6. #include <Windows.h>
  7. #include <string>
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12. int kod, wybor_1, wybor_2, wybor_3;
  13. int menu_back;
  14. string imie;
  15. int ludnosc = 5;
  16. int domki = 2;
  17. int gold = 15;
  18. cout << "Prosze wprowadzic CD-KEYA: ";
  19. cin >> kod;
  20. if (kod == 1923)
  21. {
  22. cout << endl;
  23. cout << "Witaj w konsolowej grze zrobionej przez Erzisa!" << endl;
  24. cout << "Jest to gra typu rozwoj miasta." << endl;
  25. cout << "Powodzenia!" << endl;
  26. cout << endl;
  27. cout << "Imie Twojego bohatera: " << imie;
  28. cin >> imie;
  29. system("cls");
  30. cout << "TWOJE STATYSTYKI" << endl;
  31. cout << endl;
  32. cout << "Liczba ludnosci: " << ludnosc << endl;
  33. cout << "Liczba domkow: " << domki << endl;
  34. cout << "Monety: " << gold << endl;
  35. cout << endl;
  36. cout << "Co chcesz zrobic???" << endl;
  37. cout << endl;
  38. cout << "1 = Zabic ludzi z miasta" << endl;
  39. cout << "2 = Kazac ludziom rozbudowac sie" << endl;
  40. cout << "3 = Zebrac podatki" << endl;
  41. cout << "4 = Krucjata" << endl;
  42. cin >> wybor_1;
  43. switch (wybor_1)
  44. {
  45. case 1:
  46. {
  47. cout << endl;
  48. cout << "Koniec gry!" << endl;
  49. Sleep(600);
  50. exit(0);
  51. }
  52. break;
  53. {
  54. case 2:
  55. {
  56. cout << endl;
  57. cout << "Ludzie poszli do lasu, przeniesli deski i wybudowali w osadzie 3 nowe domki." << endl;
  58. cout << "W Twojej osadzie jest teraz " << domki + 3 << " domkow!" << endl;
  59. cout << "Konsola sie wyczysci za 8 sekund" << endl;
  60. Sleep(8000);
  61. system("cls;");
  62. cout << "TWOJE STATYSTYKI" << endl;
  63. cout << endl;
  64. cout << "Liczba ludnosci: " << ludnosc << endl;
  65. cout << "Liczba domkow: " << domki + 3 << endl;
  66. cout << "Monety: " << gold << endl;
  67. cout << endl;
  68. cout << "Co chcesz zrobic???" << endl;
  69. cout << endl;
  70. cout << "1 = Statystyki bohatera" << endl;
  71. cout << "2 = Wybudowac twierdze" << endl;
  72. cout << "3 = Zebrac podatki" << endl;
  73. cout << "4 = Krucjata" << endl;
  74. cin >> wybor_2;
  75. switch (wybor_2)
  76. {
  77. case 1:
  78. {
  79. system("cls");
  80. cout << "Witaj " << imie << "." << " Oto Twoje statystyki!" << endl;
  81. cout << endl;
  82. cout << "Sila: 15" << endl;
  83. cout << "Zrecznosc: 5" << endl;
  84. cout << "Obrona: 43" << endl;
  85. cout << endl;
  86. cout << "Wpisz 1 i nacisnij enter aby powrocic do menu glownego" << endl;
  87. cin >> menu_back;
  88. if (menu_back == 1)
  89. {
  90. system("cls");
  91. cout << "TWOJE STATYSTYKI" << endl;
  92. cout << "Liczba ludnosci: " << ludnosc << endl;
  93. cout << "Liczba domkow: " << domki + 3 << endl;
  94. cout << "Monety: " << gold << endl;
  95. cout << endl;
  96. cout << "Co chcesz zrobic???" << endl;
  97. cout << endl;
  98. cout << "1 = Statystyki bohatera" << endl;
  99. cout << "2 = Wybudowac twierdze" << endl;
  100. cout << "3 = Zebrac podatki" << endl;
  101. cout << "4 = Krucjata" << endl;
  102. }
  103. else
  104. {
  105. cout << "To nie jest jeden..." << endl;
  106. cout << "Ostatnia proba. Jezeli teraz nie napiszesz 1 to gra sie wylaczy." << endl;
  107. cin >> menu_back;
  108. if (menu_back == 1)
  109. {
  110. system("cls");
  111. cout << "TWOJE STATYSTYKI" << endl;
  112. cout << endl;
  113. cout << "Liczba ludnosci: " << ludnosc << endl;
  114. cout << "Liczba domkow: " << domki + 3 << endl;
  115. cout << "Monety: " << gold << endl;
  116. cout << endl;
  117. cout << "Co chcesz zrobic???" << endl;
  118. cout << endl;
  119. cout << "1 = Statystyki bohatera" << endl;
  120. cout << "2 = Wybudowac twierdze" << endl;
  121. cout << "3 = Zebrac podatki" << endl;
  122. cout << "4 = Krucjata" << endl;
  123. }
  124. else
  125. {
  126. exit(0);
  127. }
  128. break;
  129. }
  130. }
  131. break;
  132. }
  133. }
  134. break;
  135. }
  136. case 3:
  137. {
  138. cout << endl;
  139. cout << "Zarobiles 6 monet." << endl;
  140. cout << "Teraz masz " << gold + 6 << " monet." << endl;
  141. cout << "Konsola sie wyczysci za 8 sekund" << endl;
  142. Sleep(8000);
  143. system("cls;");
  144. cout << "TWOJE STATYSTYKI" << endl;
  145. cout << endl;
  146. cout << "Liczba ludnosci: " << ludnosc << endl;
  147. cout << "Liczba domkow: " << domki << endl;
  148. cout << "Monety: " << gold + 6 << endl;
  149. cout << endl;
  150. cout << "Co chcesz zrobic???" << endl;
  151. cout << endl;
  152. cout << "1 = Statystyki bohatera" << endl;
  153. cout << "2 = Wybudowac twierdze" << endl;
  154. cout << "3 = Wydac 15 monet na ekwipunek dla armii" << endl;
  155. cout << "4 = Krucjata" << endl;
  156. }
  157. break;
  158. {
  159. case 4:
  160. {
  161. cout << endl;
  162. cout << "Niestety Turcy okazali sie szybsi! Zaszli was od tylu i byliscie zmuszeni do odwrotu" << endl;
  163. cout << "Konsola sie wyczysci za 8 sekund" << endl;
  164. Sleep(8000);
  165. system("cls;");
  166. cout << "TWOJE STATYSTYKI" << endl;
  167. cout << endl;
  168. cout << "Liczba ludnosci: " << ludnosc << endl;
  169. cout << "Liczba domkow: " << domki << endl;
  170. cout << "Monety: " << gold << endl;
  171. cout << endl;
  172. cout << "Co chcesz zrobic???" << endl;
  173. cout << endl;
  174. cout << "1 = Zabic ludzi z miasta" << endl;
  175. cout << "2 = Kazac ludziom rozbudowac sie" << endl;
  176. cout << "3 = Zebrac podatki" << endl;
  177. cout << "4 = Krucjata" << endl;
  178. }
  179. break;
  180. }
  181. }
  182. Sleep(2000000000000);
  183. return 0;
  184. }
  185. else
  186. {
  187. cout << "Niepoprawny CD-KEY! Gra sie wylaczy za 2 sekundy";
  188. Sleep(2500);
  189. }
  190. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement