Advertisement
Guest User

main.cpp

a guest
Oct 24th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.52 KB | None | 0 0
  1. #include <conio.h>
  2. #include <iostream>
  3. #include <string>
  4. #include <windows.h>
  5. #include "Menu.hpp"
  6.  
  7. using namespace std;
  8.  
  9. string strImie;
  10. int nKlasa;
  11. int nMenu;
  12. int nWiek;
  13.  
  14. void Gra()
  15. {
  16.         cout << "123";
  17. }
  18.  
  19. //KLASY
  20.  
  21. void rycerz()
  22. {
  23.         const int SILA = 10;
  24.         const int ZRECZNOSC = 4;
  25.         const int MAGIA = 0;
  26.         const int MAGIAZNISZCZENIA = 0;
  27. }
  28.  
  29. void lucznik()
  30. {
  31.         const int SILA = 4;
  32.         const int ZRECZNOSC = 10;
  33.         const int MAGIA = 0;
  34.         const int MAGIAZNISZCZENIA = 0;
  35. }
  36.  
  37. void mag()
  38. {
  39.         const int SILA = 0;
  40.         const int ZRECZNOSC = 0;
  41.         const int MAGIA = 10;
  42.         const int MAGIAZNISZCZENIA = 4;
  43. }
  44.  
  45. void magzniszczenia()
  46. {
  47.         const int SILA = 0;
  48.         const int ZRECZNOSC = 0;
  49.         const int MAGIA = 4;
  50.         const int MAGIAZNISZCZENIA = 10;
  51. }
  52.  
  53.  
  54.  
  55. void profil()
  56. {
  57.         cout << endl;
  58.         cout << "Czas opowiedziec cos o sobie:" << endl;
  59.         cout << "Podaj swoje imie: "; cin >> strImie;
  60.         cout << "Podaj swoj wiek: "; cin >> nWiek;
  61.         cout << endl;
  62.         Sleep(1000);
  63.         cout << "Nadszedl czas abys wybral klase postaci. Oto wszystkie opcje + statystyki:" << endl;
  64.         cout << endl;
  65.  
  66.         Sleep(3000);
  67.         cout << "Rycerz:" << endl;
  68.         cout << "Sila: 10" << endl;
  69.         cout << "Zrecznosc: 4" << endl;
  70.         cout << "Magia: 0" << endl;
  71.         cout << "Magia zniszczenia: 0" << endl;
  72.         cout << endl;
  73.  
  74.         Sleep(2000);
  75.         cout << "Lucznik:" << endl;
  76.         cout << "Sila: 4" << endl;
  77.         cout << "Zrecznosc: 10" << endl;
  78.         cout << "Magia: 0" << endl;
  79.         cout << "Magia zniszczenia: 0" << endl;
  80.         cout << endl;
  81.  
  82.         Sleep(2000);
  83.         cout << "Mag:" << endl;
  84.         cout << "Sila: 0" << endl;
  85.         cout << "Zrecznosc: 0" << endl;
  86.         cout << "Magia: 10" << endl;
  87.         cout << "Magia zniszczenia: 4" << endl;
  88.         cout << endl;
  89.  
  90.         Sleep(2000);
  91.         cout << "Mag zniszczenia:" << endl;
  92.         cout << "Sila: 0" << endl;
  93.         cout << "Zrecznosc: 0" << endl;
  94.         cout << "Magia: 4" << endl;
  95.         cout << "Magia zniszczenia: 10" << endl;
  96.         cout << endl;
  97.  
  98.         // Wybรณr klasy
  99.  
  100.         cout << "Twoj wybor(1.Rycerz, 2.Lucznik, 3.Mag, 4.Mag zniszczenia): "; cin >> nKlasa;
  101.  
  102.          switch (nKlasa)
  103.         {
  104.         case 1:
  105.                 rycerz(); break;
  106.         case 2:
  107.                 lucznik();break;
  108.         case 3:
  109.                 mag(); break;
  110.         case 4:
  111.                 magzniszczenia();break;
  112.         }
  113.            Gra();
  114.  
  115.         getch();
  116. }
  117.  
  118. int main()
  119. {
  120.         Sleep(300);
  121.         cout << "*****************************************************" << endl;
  122.         Sleep(300);
  123.         cout << "ForgottenWorld, wersja V1.0   //" << endl;
  124.         Sleep(300);
  125.         cout << "*****************************************************" << endl;
  126.         Sleep(300);
  127.         cout << "Witaj w zapomnianym swiecie. Twoja historia rozpoczyna" << endl;
  128.         Sleep(300);
  129.         cout << "sie po katastrofie statku na ktorym plynales." << endl;
  130.         Sleep(300);
  131.         cout << "Budzisz sie na plazy" << endl;
  132.         Sleep(300);
  133.         cout << endl;
  134.  
  135.         // Menu
  136.  
  137.         cout << "1. Rozpocznij gre" << endl;
  138.         cout << "2. Wyjscie" << endl;
  139.         cout << "Twoj wybor (1 lub 2): "; cin >> nMenu;
  140.  
  141.  
  142.         switch (nMenu)
  143.         {
  144.         case 1:
  145.                 profil();
  146.         case 2:
  147.                 break;
  148.         }
  149.  
  150.  
  151. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement