Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // main.cpp
- int main()
- {
- return 0;
- }
- // head.h
- #ifndef HEAD_H_INCLUDED
- #define HEAD_H_INCLUDED
- class Szachownica;
- class Gra;
- class Gracz;
- class Bierka;
- class Pionek;
- class Wieza;
- class Skoczek;
- class Goniec;
- class Hetman;
- class Krol;
- class Interfejs;
- enum class pole
- {
- puste, pionek_w, pionek_b, wieza_w, wieza_b, skoczek_w, skoczek_b, goniec_w, goniec_b, hetman_w, hetman_b, krol_w, krol_b
- };
- enum class kolor
- {
- white, black
- };
- enum class stan
- {
- otwarta, mat_biale, mat_czarne, szach_biale, szach_czarne, remis
- };
- #endif // HEAD_H_INCLUDED
- // Szachownica.h
- #ifndef SZACHOWNICA_H
- #define SZACHOWNICA_H
- #include "../head.h"
- class Szachownica
- {
- public:
- Szachownica();
- ~Szachownica();
- void wypisz_plansze();
- private:
- pole plansza[8][8];
- };
- #endif // SZACHOWNICA_H
- // Szachownica.cpp
- #include "Szachownica.h"
- Szachownica::Szachownica()
- {
- //ctor
- }
- Szachownica::~Szachownica()
- {
- //dtor
- }
- // Gracz.h
- #ifndef GRACZ_H
- #define GRACZ_H
- #include "../head.h"
- class Gracz
- {
- public:
- Gracz();
- ~Gracz();
- private:
- kolor bw;
- Bierka* bierki[16];
- };
- #endif // GRACZ_H
- // Gracz.cpp
- #include "Gracz.h"
- Gracz::Gracz()
- {
- //ctor
- }
- Gracz::~Gracz()
- {
- //dtor
- }
- // Bierka.h
- #ifndef BIERKA_H
- #define BIERKA_H
- #include "../head.h"
- class Bierka
- {
- public:
- Bierka();
- virtual ~Bierka();
- protected:
- kolor bw;
- pole figura;
- bool aktywna;
- };
- #endif // BIERKA_H
- // Bierka.cpp
- #include "Bierka.h"
- Bierka::Bierka()
- {
- //ctor
- }
- Bierka::~Bierka()
- {
- //dtor
- }
- // Gra.h
- #ifndef GRA_H
- #define GRA_H
- #include "../head.h"
- class Gra
- {
- public:
- Gra();
- private:
- Gracz* biale;
- Gracz* czarne;
- Szachownica* szachownica;
- stan stan_gry;
- };
- #endif // GRA_H
- // Gra.cpp
- #include "Gra.h"
- Gra::Gra()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement