diff --git a/src/chessmen.cpp b/src/chessmen.cpp new file mode 100755 index 0000000..e69de29 diff --git a/src/chessmen.hpp b/src/chessmen.hpp new file mode 100755 index 0000000..26fc992 --- /dev/null +++ b/src/chessmen.hpp @@ -0,0 +1,28 @@ +#ifndef _CHESSMEN_HPP_ +#define _CHESSMEN_HPP_ + +/*=== LIBRARIES ==============================================================*/ +#include +#include +#include + + +/*=== LIBRARY FORWARD ========================================================*/ + + +/*=== MAIN ===================================================================*/ +class chessmen{ + public: + chessmen(std::string & Name, unsigned Colour); + chessmen(std::string && Name, unsigned Colour); + + std::string name(); + unsigned colour(); + + + + private: + std::string _Name; + unsigned _Colour; +}; +#endif \ No newline at end of file diff --git a/src/field.cpp b/src/field.cpp new file mode 100755 index 0000000..29a7f68 --- /dev/null +++ b/src/field.cpp @@ -0,0 +1,16 @@ +#include "field.hpp" + +field::field(): _CoordX(0),_CoordY(0), _Figure(NULL){ +} + +field::field(unsigned CoordX, unsigned CoordY): _CoordX(CoordX),_CoordY(CoordY){ + _Figure = std::make_shared(NULL); +} + +field::field(unsigned CoordX, unsigned CoordY, int & Figure): _CoordX(CoordX),_CoordY(CoordY){ + _Figure = std::make_shared(Figure); +} + +field::field(unsigned CoordX, unsigned CoordY, int && Figure): _CoordX(CoordX),_CoordY(CoordY){ + _Figure = std::make_shared(Figure); +} \ No newline at end of file diff --git a/src/field.hpp b/src/field.hpp new file mode 100755 index 0000000..a34b3b5 --- /dev/null +++ b/src/field.hpp @@ -0,0 +1,30 @@ +#ifndef _FIELD_HPP_ +#define _FIELD_HPP_ + + +/*=== LIBRARIES ==============================================================*/ +#include +#include + + +/*=== LIBRARY FORWARD ========================================================*/ +class chessmen; + +/*=== MAIN ===================================================================*/ +class field{ + public: + field(); + field(unsigned CoordX, unsigned CoordY); + field(unsigned CoordX, unsigned CoordY, int & Figure); + field(unsigned CoordX, unsigned CoordY, int && Figure); + + bool has_figure(); + + private: + unsigned _CoordX; + unsigned _CoordY; + + std::shared_ptr _Figure; + +}; +#endif \ No newline at end of file