move all games into specific directories
This commit is contained in:
parent
62b023792b
commit
f86133527a
18 changed files with 27 additions and 24 deletions
7
Makefile
7
Makefile
|
@ -6,7 +6,7 @@ MKDIR = mkdir -p
|
|||
|
||||
SRC_DIR = src
|
||||
INC_DIR = includes
|
||||
SOURCES = $(wildcard $(SRC_DIR)/*.cpp)
|
||||
SOURCES = $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/**/*.cpp)
|
||||
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
|
||||
|
||||
CXXFLAGS = --std=c++11
|
||||
|
@ -22,6 +22,9 @@ PDF_DIR = report
|
|||
%.cpp.o: $(SRC_DIR)/%.cpp
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||||
|
||||
%.cpp.o: $(SRC_DIR)/**/%.cpp
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||||
|
||||
main: CXXFLAGS += -O3
|
||||
main: compilation
|
||||
|
||||
|
@ -30,7 +33,7 @@ dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion
|
|||
dev: compilation
|
||||
|
||||
compilation: $(OBJETS)
|
||||
$(CXX) -o $(EXE).$(EXE_EXT) $(OBJETS) $(LIBS)
|
||||
$(CXX) -o $(EXE).$(EXE_EXT) $^ $(LIBS)
|
||||
|
||||
all:
|
||||
main
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "../includes/Joueur.hpp"
|
||||
#include "../includes/PlateauButin.hpp"
|
||||
#include "../Joueur.hpp"
|
||||
#include "PlateauButin.hpp"
|
||||
|
||||
class Butin {
|
||||
friend std::ostream &operator<<(std::ostream &, const Butin &);
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Piece.hpp"
|
||||
#include "../Piece.hpp"
|
||||
|
||||
class PieceButin : public Piece {
|
||||
int points;
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Plateau.hpp"
|
||||
#include "../Plateau.hpp"
|
||||
|
||||
class PlateauButin : public Plateau {
|
||||
public:
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "../includes/Joueur.hpp"
|
||||
#include "../includes/Plateau.hpp"
|
||||
#include "../Joueur.hpp"
|
||||
#include "../Plateau.hpp"
|
||||
|
||||
class Dames {
|
||||
friend std::ostream &operator<<(std::ostream &, const Dames &);
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Piece.hpp"
|
||||
#include "../Piece.hpp"
|
||||
|
||||
class PieceDames : public Piece {
|
||||
// True si la piece est une dame
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Piece.hpp"
|
||||
#include "../Piece.hpp"
|
||||
|
||||
class PieceSafari : public Piece {
|
||||
public:
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Plateau.hpp"
|
||||
#include "../Plateau.hpp"
|
||||
|
||||
class PlateauSafari : public Plateau {
|
||||
public:
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "../includes/Joueur.hpp"
|
||||
#include "../includes/PieceSafari.hpp"
|
||||
#include "../includes/PlateauSafari.hpp"
|
||||
#include "../Joueur.hpp"
|
||||
#include "PieceSafari.hpp"
|
||||
#include "PlateauSafari.hpp"
|
||||
|
||||
class Safari {
|
||||
friend std::ostream &operator<<(std::ostream &, const Safari &);
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/Butin.hpp"
|
||||
#include "../../includes/Butin/Butin.hpp"
|
||||
|
||||
Butin::Butin(Joueur &j1, Joueur &j2)
|
||||
: plateau(PlateauButin()), joueur1{j1}, joueur2{j2}, joueurCourant{j1} {
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/PieceButin.hpp"
|
||||
#include "../../includes/Butin/PieceButin.hpp"
|
||||
|
||||
PieceButin::PieceButin(const std::string cat) : Piece(cat) {
|
||||
std::cout << "pièce - " << cat << "\n";
|
|
@ -1,5 +1,5 @@
|
|||
#include "../includes/PlateauButin.hpp"
|
||||
#include "../includes/PieceButin.hpp"
|
||||
#include "../../includes/Butin/PlateauButin.hpp"
|
||||
#include "../../includes/Butin/PieceButin.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <random>
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/Dames.hpp"
|
||||
#include "../../includes/Dames/Dames.hpp"
|
||||
|
||||
Dames::Dames(Joueur &j1, Joueur &j2)
|
||||
: plateau(Plateau(10)), joueur1(j1), joueur2(j2), joueurCourant(j1) {
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/PieceDames.hpp"
|
||||
#include "../../includes/Dames/PieceDames.hpp"
|
||||
|
||||
PieceDames::PieceDames(const std::string cat) : Piece(cat) {
|
||||
std::cout << "pièce - " << cat << "\n";
|
|
@ -1,6 +1,6 @@
|
|||
#include "../includes/Plateau.hpp"
|
||||
#include "../includes/Dames/PieceDames.hpp"
|
||||
#include "../includes/Ecran.hpp"
|
||||
#include "../includes/PieceDames.hpp"
|
||||
|
||||
Plateau::Plateau(int t) : plateau(new Piece **[t]), taille(t) {
|
||||
// Création du plateau vide
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/PieceSafari.hpp"
|
||||
#include "../../includes/Safari/PieceSafari.hpp"
|
||||
|
||||
PieceSafari::PieceSafari(const std::string cat) : Piece(cat) {
|
||||
std::cout << "pièce - " << cat << "\n";
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/PlateauSafari.hpp"
|
||||
#include "../../includes/Safari/PlateauSafari.hpp"
|
||||
|
||||
PlateauSafari::PlateauSafari(int t) : Plateau(t) {}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "../includes/Safari.hpp"
|
||||
#include "../../includes/Safari/Safari.hpp"
|
||||
|
||||
Safari::Safari(Joueur &j1, Joueur &j2, Joueur &j3)
|
||||
: plateau(PlateauSafari(8)), joueur1{j1}, joueur2{j2}, joueur3{j3},
|
Reference in a new issue