2019-05-27 15:50:51 +02:00
|
|
|
|
#pragma once
|
|
|
|
|
#ifndef PCH_H
|
|
|
|
|
#define PCH_H
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <ctime>
|
|
|
|
|
#include <fstream>
|
|
|
|
|
extern bool gra;
|
|
|
|
|
std::fstream zapis; //deklaracja pliku dla drzewka
|
|
|
|
|
|
|
|
|
|
typedef
|
|
|
|
|
struct droga
|
|
|
|
|
{
|
|
|
|
|
int _droga;
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
int dlugosc;
|
|
|
|
|
}droga;
|
|
|
|
|
|
|
|
|
|
//definicja struktury sciezki przekazywanie danych do drzewa decyzyjnego
|
|
|
|
|
|
|
|
|
|
typedef
|
|
|
|
|
struct sciezka
|
|
|
|
|
{
|
|
|
|
|
int numer; //nummer pozycji x 1,4,7,10,13,16,19,22
|
|
|
|
|
int ilosc_roslin_bez_wody;
|
|
|
|
|
int ilosc_roslin_bez_nawozu;
|
|
|
|
|
int waga;
|
|
|
|
|
int poczatek;
|
|
|
|
|
int koniec;
|
|
|
|
|
}sciezka;
|
|
|
|
|
|
|
|
|
|
//definicja struktury rosliny
|
|
|
|
|
typedef
|
|
|
|
|
struct roslina
|
|
|
|
|
{
|
|
|
|
|
int stan;
|
|
|
|
|
double woda;
|
|
|
|
|
double nawoz;
|
|
|
|
|
double zycie;
|
|
|
|
|
double sadzonka;
|
|
|
|
|
int waga;
|
|
|
|
|
int rodzaj;
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
int wod;
|
|
|
|
|
int wod_check;
|
|
|
|
|
int naw;
|
|
|
|
|
int naw_check;
|
|
|
|
|
std::string lisc; //cecha
|
|
|
|
|
std::string kwiat; //cecha
|
|
|
|
|
std::string kolor; //cecha
|
|
|
|
|
}roslina;
|
|
|
|
|
|
|
|
|
|
extern char mapa[25][25];
|
2019-05-28 14:38:26 +02:00
|
|
|
|
extern int pozycjaX, pozycjaY, ilosc_roslin, ilosc_plonow, ilosc_trupow, paliwo, konrolka, h, pog;
|
2019-05-27 15:50:51 +02:00
|
|
|
|
extern clock_t start, stop;
|
|
|
|
|
extern double czas;
|
|
|
|
|
|
|
|
|
|
//struktura do przekazywania danych
|
|
|
|
|
extern droga glowna;
|
|
|
|
|
|
|
|
|
|
//mapa roslin
|
|
|
|
|
extern roslina tab[25][25];
|
|
|
|
|
|
|
|
|
|
//tablica scierzek
|
|
|
|
|
extern sciezka scierzka[16];
|
|
|
|
|
|
|
|
|
|
extern sciezka sciezka_temp; //pomocnicze
|
|
|
|
|
|
|
|
|
|
droga oblicz(int x, int y);
|
|
|
|
|
droga znajdz();
|
|
|
|
|
void idz();
|
|
|
|
|
void ustaw_stan();
|
|
|
|
|
void updateMapa();
|
|
|
|
|
void Odswiez(void* data);
|
|
|
|
|
void Chodz(void* data);
|
|
|
|
|
void ShowConsoleCursor(bool showFlag);
|
|
|
|
|
void dzialanie(char klikniecie);
|
2019-05-28 14:38:26 +02:00
|
|
|
|
void pogoda();
|
2019-05-27 15:50:51 +02:00
|
|
|
|
|
|
|
|
|
#endif _PCH_H
|
|
|
|
|
|