Advertisement
erzis

Untitled

Oct 24th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 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;
  13. int ludnosc = 5;
  14. int domki = 2;
  15. int gold = 15;
  16. cout << "Prosze wprowadzic CD-KEYA: ";
  17. cin >> kod;
  18. if (kod == 1923)
  19. {
  20. cout << endl;
  21. cout << "Witaj w konsolowej grze zrobionej przez Erzisa!" << endl;
  22. cout << "Jest to gra typu rozwoj miasta." << endl;
  23. cout << "Powodzenia!" << endl;
  24. cout << endl;
  25. cout << "Liczba ludnosci: " << ludnosc << endl;
  26. cout << "Liczba domkow: " << domki << endl;
  27. cout << "Monety: " << gold << endl;
  28. cout << endl;
  29. cout << "Co chcesz zrobic???" << endl;
  30. cout << endl;
  31. cout << "1 = Zabic ludzi z miasta" << endl;
  32. cout << "2 = Kazac ludziom rozbudowac sie" << endl;
  33. cout << "3 = Zebrac podatki" << endl;
  34. cout << "4 = Krucjata" << endl;
  35. cin >> wybor_1;
  36. switch (wybor_1)
  37. {
  38. case 1:
  39. {
  40. cout << endl;
  41. cout << "Koniec gry!" << endl;
  42. Sleep(600);
  43. exit(0);
  44. }
  45. break;
  46. {
  47. case 2:
  48. {
  49. cout << endl;
  50. cout << "Ludzie poszli do lasu, przeniesli deski i wybudowali w osadzie 3 nowe domki." << endl;
  51. cout << "W Twojej osadzie jest teraz " << domki + 3 << " domkow!" << endl;
  52. cout << "Konsola sie wyczysci za 8 sekund" << endl;
  53. Sleep(8000);
  54. system("cls;");
  55. cout << "TWOJE STATYSTYKI" << endl;
  56. cout << endl;
  57. cout << "Liczba ludnosci: " << ludnosc << endl;
  58. cout << "Liczba domkow: " << domki + 3 << endl;
  59. cout << "Monety: " << gold << endl;
  60. }
  61. break;
  62. }
  63. case 3:
  64. {
  65. cout << endl;
  66. cout << "Zarobiles 6 monet." << endl;
  67. cout << "Teraz masz " << gold + 6 << " monet." << endl;
  68. cout << "Konsola sie wyczysci za 8 sekund" << endl;
  69. Sleep(8000);
  70. system("cls;");
  71. cout << "TWOJE STATYSTYKI" << endl;
  72. cout << endl;
  73. cout << "Liczba ludnosci: " << ludnosc << endl;
  74. cout << "Liczba domkow: " << domki << endl;
  75. cout << "Monety: " << gold + 6 << endl;
  76. }
  77. break;
  78. {
  79. case 4:
  80. {
  81. cout << endl;
  82. cout << "Niestety Turcy okazali sie szybsi! Zaszli was od tylu i byliscie zmuszeni do odwrotu" << endl;
  83. cout << "Konsola sie wyczysci za 8 sekund" << endl;
  84. Sleep(8000);
  85. system("cls;");
  86. cout << "TWOJE STATYSTYKI" << endl;
  87. cout << endl;
  88. cout << "Liczba ludnosci: " << ludnosc << endl;
  89. cout << "Liczba domkow: " << domki << endl;
  90. cout << "Monety: " << gold - 5 << endl;
  91. }
  92. break;
  93. }
  94.  
  95. }
  96. Sleep(2000000000000);
  97. return 0;
  98. }
  99. else
  100. {
  101. cout << "Niepoprawny CD-KEY! Gra sie wylaczy za 2 sekundy";
  102. Sleep(2500);
  103. }
  104.  
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement