Advertisement
Guest User

Untitled

a guest
Jun 21st, 2015
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. #ifndef _CLASS_H
  2. #define _CLASS_H
  3.  
  4. #include <iostream>
  5. #include <windows.h>
  6. #include<cstdio>
  7. #include<cstdlib>
  8. #include <conio.h>
  9. #include <vector>
  10.  
  11. #include <unistd.h>
  12.  
  13. using namespace std;
  14.  
  15. const int MAPA_X = 40;
  16. const int MAPA_Y = 70;
  17. class Interaction
  18. {
  19. public:
  20. virtual void make()=0;
  21. };
  22.  
  23. // klasa kontroli pozycjonowania elementow
  24. class Pozycja
  25. {
  26. public: int x,y;
  27.  
  28. };
  29. //glowna klasa gry odpowiada za dzialania, ruch i tworzenie elementow
  30. class Game : public virtual Interaction, public Pozycja
  31. {
  32.  
  33. protected:
  34. Pozycja player;
  35. vector<Pozycja> enemy;
  36. int wynik;
  37. int liczba_enemy;
  38. public:
  39. Game();
  40. bool przegrana;
  41. bool Lose();
  42. void make(){};
  43. void gameStatus();
  44. void createEnemy(int numer);
  45. vector<Pozcyja>&return_referenceEnemy();
  46. void podnies_wynik();
  47. void player_move();
  48. void enemy_move();
  49. Pozycja& return_referencePlayer();
  50. };
  51.  
  52. //tworzy i wyswietla menu wejsciowe w konsoli
  53. class Menu : public Game
  54. {
  55. public:
  56. char menu;
  57. void start();
  58.  
  59. };
  60. //generuje plansze i ustawia pozycje postaci
  61. class World:public Game //public Game
  62. { private:
  63.  
  64. int mapka[MAPA_X][MAPA_Y];
  65.  
  66. public:
  67. void make(){};
  68. World();
  69. void rysuj();
  70. void resetMap();
  71. void setEnemy(vector<Pozycja>& enemy);
  72. void setPlayer(Pozycja& player);
  73. };
  74.  
  75. //koniec deklaracji funkcjii class
  76. #endif // CLASS.H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement