diff --git a/Chess/dep/ChessContext.cpp b/Chess/dep/ChessContext.cpp index 75957cf..640612a 100644 --- a/Chess/dep/ChessContext.cpp +++ b/Chess/dep/ChessContext.cpp @@ -1,3 +1,5 @@ +#include "ChessContext.h" + /* [1] Initialisation de la partie =========================================================*/ void ChessContext::init(){ diff --git a/Chess/dep/ChessContext.h b/Chess/dep/ChessContext.h index aeeb6fd..eb30bdb 100644 --- a/Chess/dep/ChessContext.h +++ b/Chess/dep/ChessContext.h @@ -33,6 +33,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "ChessContext.cpp" + // #include "ChessContext.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Grid.cpp b/Chess/dep/Grid.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Chess/dep/Grid.h b/Chess/dep/Grid.h deleted file mode 100644 index 2037835..0000000 --- a/Chess/dep/Grid.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef DEF_GRID - - #define DEF_GRID - - /* [1] Libs - =========================================================*/ - /* (1) Internes */ - #include - #include - #include - - /* (2) Externes */ - #include "term.h" - #include "Pieces/PieceFactory.h" - - /* (3) Namespace */ - using namespace std; - - - /* [2] Definition - =========================================================*/ - class Grid{ - public: - Grid(const int w=8, const int h=8); - - // GETTERS - Piece pieceAt(const int x, const int y) const; - - private: - // vector _cells; - }; - - /* [n] Inclusion du corps - =========================================================*/ - #include "Grid.cpp" - -#endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Cavalier.cpp b/Chess/dep/Pieces/Cavalier.cpp index c1a6735..d6b3469 100644 --- a/Chess/dep/Pieces/Cavalier.cpp +++ b/Chess/dep/Pieces/Cavalier.cpp @@ -1,3 +1,4 @@ +#include "Cavalier.h" Cavalier::Cavalier(int x, int y) : Piece(CAVALIER, x, y) { diff --git a/Chess/dep/Pieces/Cavalier.h b/Chess/dep/Pieces/Cavalier.h index 0ef3e68..07154a3 100644 --- a/Chess/dep/Pieces/Cavalier.h +++ b/Chess/dep/Pieces/Cavalier.h @@ -26,6 +26,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Cavalier.cpp" + // #include "Cavalier.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Fou.cpp b/Chess/dep/Pieces/Fou.cpp index 84357ae..fc20e98 100644 --- a/Chess/dep/Pieces/Fou.cpp +++ b/Chess/dep/Pieces/Fou.cpp @@ -1,3 +1,4 @@ +#include "Fou.h" Fou::Fou(int x, int y) : Piece(FOU, x, y) { diff --git a/Chess/dep/Pieces/Fou.h b/Chess/dep/Pieces/Fou.h index 43b548d..daf3b04 100644 --- a/Chess/dep/Pieces/Fou.h +++ b/Chess/dep/Pieces/Fou.h @@ -26,6 +26,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Fou.cpp" + // #include "Fou.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Piece.cpp b/Chess/dep/Pieces/Piece.cpp index 1fc1d10..a397f3c 100644 --- a/Chess/dep/Pieces/Piece.cpp +++ b/Chess/dep/Pieces/Piece.cpp @@ -1,3 +1,5 @@ +#include "Piece.h" + Piece::Piece(PIECE_TYPE t, int x, int y) : _t(t), _x(x), _y(y){ } diff --git a/Chess/dep/Pieces/Piece.h b/Chess/dep/Pieces/Piece.h index 01ce9d9..08bc0c9 100644 --- a/Chess/dep/Pieces/Piece.h +++ b/Chess/dep/Pieces/Piece.h @@ -39,7 +39,7 @@ return o << "UNKNOWN"; } - +// /* [2] Definition =========================================================*/ class Piece{ @@ -70,6 +70,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Piece.cpp" + // #include "Piece.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Piece.h.gch b/Chess/dep/Pieces/Piece.h.gch new file mode 100644 index 0000000..f8ead6d Binary files /dev/null and b/Chess/dep/Pieces/Piece.h.gch differ diff --git a/Chess/dep/Pieces/PieceFactory.cpp b/Chess/dep/Pieces/PieceFactory.cpp index 264197a..2e4f640 100644 --- a/Chess/dep/Pieces/PieceFactory.cpp +++ b/Chess/dep/Pieces/PieceFactory.cpp @@ -1,3 +1,5 @@ +#include "PieceFactory.h" + Piece& PieceFactory::create(PIECE_TYPE t, int x, int y){ Piece *p; diff --git a/Chess/dep/Pieces/PieceFactory.h b/Chess/dep/Pieces/PieceFactory.h index f98f685..2713c1c 100644 --- a/Chess/dep/Pieces/PieceFactory.h +++ b/Chess/dep/Pieces/PieceFactory.h @@ -25,6 +25,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "PieceFactory.cpp" + // #include "PieceFactory.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Reine.cpp b/Chess/dep/Pieces/Reine.cpp index 623e407..6562630 100644 --- a/Chess/dep/Pieces/Reine.cpp +++ b/Chess/dep/Pieces/Reine.cpp @@ -1,3 +1,4 @@ +#include "Reine.h" Reine::Reine(int x, int y) : Piece(REINE, x, y) { diff --git a/Chess/dep/Pieces/Reine.h b/Chess/dep/Pieces/Reine.h index b16492f..38daebe 100644 --- a/Chess/dep/Pieces/Reine.h +++ b/Chess/dep/Pieces/Reine.h @@ -26,6 +26,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Reine.cpp" + // #include "Reine.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Roi.cpp b/Chess/dep/Pieces/Roi.cpp index 0a8d9b5..0160f76 100644 --- a/Chess/dep/Pieces/Roi.cpp +++ b/Chess/dep/Pieces/Roi.cpp @@ -1,3 +1,4 @@ +#include "Roi.h" Roi::Roi(int x, int y) : Piece(ROI, x, y) { diff --git a/Chess/dep/Pieces/Roi.h b/Chess/dep/Pieces/Roi.h index 7d90f22..3075732 100644 --- a/Chess/dep/Pieces/Roi.h +++ b/Chess/dep/Pieces/Roi.h @@ -26,6 +26,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Roi.cpp" + // #include "Roi.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Pieces/Tour.cpp b/Chess/dep/Pieces/Tour.cpp index be80cb3..223a0d6 100644 --- a/Chess/dep/Pieces/Tour.cpp +++ b/Chess/dep/Pieces/Tour.cpp @@ -1,3 +1,4 @@ +#include "Tour.h" Tour::Tour(int x, int y) : Piece(TOUR, x, y) { diff --git a/Chess/dep/Pieces/Tour.h b/Chess/dep/Pieces/Tour.h index 9a4565c..f849e6f 100644 --- a/Chess/dep/Pieces/Tour.h +++ b/Chess/dep/Pieces/Tour.h @@ -26,6 +26,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Tour.cpp" + // #include "Tour.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/Player.cpp b/Chess/dep/Player.cpp index 8890250..2735459 100644 --- a/Chess/dep/Player.cpp +++ b/Chess/dep/Player.cpp @@ -1,3 +1,5 @@ +#include "Player.h" + // CONSTRUCTEUR Player::Player(bool first) : _first(first){ setfont(GREEN, BOLD); diff --git a/Chess/dep/Player.h b/Chess/dep/Player.h index bddb4e6..e61086e 100644 --- a/Chess/dep/Player.h +++ b/Chess/dep/Player.h @@ -40,6 +40,6 @@ /* [n] Inclusion du corps =========================================================*/ - #include "Player.cpp" + // #include "Player.cpp" #endif \ No newline at end of file diff --git a/Chess/dep/term.h.gch b/Chess/dep/term.h.gch new file mode 100644 index 0000000..a274654 Binary files /dev/null and b/Chess/dep/term.h.gch differ diff --git a/Chess/makefile b/Chess/makefile new file mode 100644 index 0000000..127516f --- /dev/null +++ b/Chess/makefile @@ -0,0 +1,20 @@ +# INIT > STRUCTURE DE FICHIERS POUR LES EXECUTABLES +begin: + mkdir dep.o + mkdir dep.o/Pieces.o + + +# TERM < OPERATION SUR LE TERMINAL +dep/term.o: dep/term.cpp + g++ -c dep/term.h -o term.o + + + + + + + + +# RESET > SUPPRESSION DE LA STRUCTURE DE FICHIERS +clean: + rm -r dep.o \ No newline at end of file