Advertisement
erzis

Untitled

Oct 25th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 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. #include <conio.h>
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13. int kod, wybor_1 = 99;
  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 << "Niepoprawny CD-KEY! Gra sie wylaczy za 2 sekundy";
  23. Sleep(2000);
  24. exit(0);
  25. }
  26.  
  27. cout << endl;
  28. cout << "Witaj w konsolowej grze zrobionej przez Erzisa!" << endl;
  29. cout << "Jest to gra typu rozwoj miasta." << endl;
  30. cout << "Powodzenia!" << endl;
  31. cout << endl;
  32. cout << "Imie Twojego bohatera: " << imie;
  33. cin >> imie;
  34. while(wybor_1 != 0)
  35. {
  36. system("cls");
  37. cout << "TWOJE STATYSTYKI" << endl;
  38. cout << endl;
  39. cout << "Liczba ludnosci: " << ludnosc << endl;
  40. cout << "Liczba domkow: " << domki << endl;
  41. cout << "Monety: " << gold << endl;
  42. cout << endl;
  43. cout << "Co chcesz zrobic???" << endl;
  44. cout << endl;
  45. cout << "1 = Zabic ludzi z miasta" << endl;
  46. cout << "2 = Kazac ludziom rozbudowac sie" << endl;
  47. cout << "3 = Zebrac podatki" << endl;
  48. cout << "4 = Krucjata" << endl;
  49. cin >> wybor_1;
  50. switch (wybor_1)
  51. {
  52. case 1:
  53. {
  54. cout << endl;
  55. cout << "Koniec gry!" << endl;
  56. Sleep(600);
  57. exit(0);
  58. }
  59. break;
  60. {
  61. case 2:
  62. {
  63. cout << endl;
  64. cout << "Ludzie poszli do lasu, przeniesli deski i wybudowali w osadzie 3 nowe domki." << endl;
  65. cout << "W Twojej osadzie jest teraz " << domki + 3 << " domkow!" << endl;
  66. domki = domki + 3;
  67. cout << "Nacisnij cokolwiek aby wrocic do menu glownego." << endl;
  68. _getch();
  69. }
  70. break;
  71. }
  72. case 3:
  73. {
  74. cout << endl;
  75. cout << "Zarobiles 6 monet." << endl;
  76. cout << "Teraz masz " << gold + 6 << " monet." << endl;
  77. gold = gold + 6;
  78. cout << "Nacisnij cokolwiek aby wrocic do menu glownego." << endl;
  79. _getch();
  80. }
  81. break;
  82. {
  83. case 4:
  84. {
  85. cout << endl;
  86. cout << "Niestety Turcy okazali sie szybsi! Zaszli was od tylu i byliscie zmuszeni do odwrotu!" << endl;
  87. cout << "Nacisnij cokolwiek aby wrocic do menu glownego." << endl;
  88. _getch();
  89. }
  90. break;
  91. }
  92. }
  93. }
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement