Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.03 KB | None | 0 0
  1. #pragma once
  2. #ifndef Snake_H
  3. #define Snake_H
  4.  
  5. #include <windows.h>
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <conio.h>
  9. #include <time.h>
  10.  
  11. #define Czarny 0
  12. #define Niebieski 1
  13. #define Zielony 2
  14. #define Cyjan 3
  15. #define Czerwony 4
  16. #define Kaarmazynowy 5
  17. #define Zolty 6
  18. #define Bialy 7
  19. #define Szary 8
  20. #define Jasno_niebieski 9
  21. #define Jasno_zielony 10
  22. #define Jasno_cyjanowy 11
  23. #define Jasno_czerwony 12
  24. #define Jasno_karmazynowy 13
  25. #define Jasno_zolty 14
  26. #define Jasna_biel 15
  27.  
  28.  
  29.  
  30. #define GORA 72
  31. #define DOL 80
  32. #define LEWO 75
  33. #define PRAWO 77
  34. #define SPACJA 32
  35. #define ENTER 13
  36. #define ESCAPE 27
  37.  
  38.  
  39. class Snake
  40. {
  41.     public:
  42.  
  43.         int snake_x_lokalizacja[301];
  44.         int snake_y_lokalizacja[301];
  45.         int kolor_tla, kolor_granicy, kolor_jablka, kolor_jablka_ewy, kolor_n, kolor_weza;
  46.         unsigned char waz, p_waz, dlugosc_weza;
  47.         int jablko, losowy_x, losowy_y;
  48.         int jablko_ewy, losowy_xx, losowy_yy;
  49.         int poziom;
  50.         int punkty;
  51.         char powtorz_rozgrywke;
  52.  
  53.         int i, j;
  54.         int c_x, c_y;
  55.         int x, y, poprzednie_x, poprzednie_y;
  56.         int linie, kolumny;
  57.         char znak_z_reki;
  58.         int kierunek, poziom_trudnosci;
  59.  
  60.     public:
  61.         Snake();
  62.         Snake(int i);
  63.         ~Snake()
  64.  
  65.     public:
  66.  
  67.         void Ustawienia();
  68.         void Gra();
  69.         void Tlo_gry();
  70.         void Zainicjuj_weza();
  71.         void Wylap_kolizje();
  72.         void Przyciski();
  73.         void Poka_sowe_a_wlasciwie_weza();
  74.         void Lokalizacja_weza();
  75.         void Wyrzuc_jablko();
  76.         void Sprawdz_jablko();
  77.         void Wylosuj_jablko();
  78.         void Koniec_gry();
  79.         void Wyswietl();
  80.  
  81.         void idz_do_x_y(int x, int y);
  82.         void wyczysc_ekran();
  83.         void ustaw_kolor(WORD kolor);
  84.         void wyczysc_boksa(unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2, unsigned char b);
  85.         void boks(unsigned x, unsigned y, unsigned sx, unsigned sy, unsigned char kolorr, unsigned char kolorr2, char tekst_[]);
  86.         void umiesc_boksa(unsigned x1, unsigned y1, unsigned x2, unsigned y2,
  87.             unsigned char texcol, unsigned char frcol,
  88.             unsigned char bkgcol, char bheader[]);
  89.         void CalclateFramesPerSecond();
  90.  
  91. };
  92. #endif snake_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement