Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #ifndef Snake_H
- #define Snake_H
- #include <windows.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <time.h>
- #define Czarny 0
- #define Niebieski 1
- #define Zielony 2
- #define Cyjan 3
- #define Czerwony 4
- #define Kaarmazynowy 5
- #define Zolty 6
- #define Bialy 7
- #define Szary 8
- #define Jasno_niebieski 9
- #define Jasno_zielony 10
- #define Jasno_cyjanowy 11
- #define Jasno_czerwony 12
- #define Jasno_karmazynowy 13
- #define Jasno_zolty 14
- #define Jasna_biel 15
- #define GORA 72
- #define DOL 80
- #define LEWO 75
- #define PRAWO 77
- #define SPACJA 32
- #define ENTER 13
- #define ESCAPE 27
- class Snake
- {
- public:
- int snake_x_lokalizacja[301];
- int snake_y_lokalizacja[301];
- int kolor_tla, kolor_granicy, kolor_jablka, kolor_jablka_ewy, kolor_n, kolor_weza;
- unsigned char waz, p_waz, dlugosc_weza;
- int jablko, losowy_x, losowy_y;
- int jablko_ewy, losowy_xx, losowy_yy;
- int poziom;
- int punkty;
- char powtorz_rozgrywke;
- int i, j;
- int c_x, c_y;
- int x, y, poprzednie_x, poprzednie_y;
- int linie, kolumny;
- char znak_z_reki;
- int kierunek, poziom_trudnosci;
- public:
- Snake();
- Snake(int i);
- ~Snake()
- public:
- void Ustawienia();
- void Gra();
- void Tlo_gry();
- void Zainicjuj_weza();
- void Wylap_kolizje();
- void Przyciski();
- void Poka_sowe_a_wlasciwie_weza();
- void Lokalizacja_weza();
- void Wyrzuc_jablko();
- void Sprawdz_jablko();
- void Wylosuj_jablko();
- void Koniec_gry();
- void Wyswietl();
- void idz_do_x_y(int x, int y);
- void wyczysc_ekran();
- void ustaw_kolor(WORD kolor);
- void wyczysc_boksa(unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2, unsigned char b);
- void boks(unsigned x, unsigned y, unsigned sx, unsigned sy, unsigned char kolorr, unsigned char kolorr2, char tekst_[]);
- void umiesc_boksa(unsigned x1, unsigned y1, unsigned x2, unsigned y2,
- unsigned char texcol, unsigned char frcol,
- unsigned char bkgcol, char bheader[]);
- void CalclateFramesPerSecond();
- };
- #endif snake_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement