diff --git a/Pontu/CMakeLists.txt b/Pontu/CMakeLists.txt index 1ec61d8..71c6839 100644 --- a/Pontu/CMakeLists.txt +++ b/Pontu/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.13) SET(ProjetName Pontu) -#SET(TestTargetName ) - - project(${ProjetName}) @@ -15,4 +12,4 @@ SET(WarningGCC -Wall -Wextra -pedantic -Wconversion -std=c17 -D_REENTRANT) target_compile_options(${ProjetName} PRIVATE ${WarningGCC} -Og -fdiagnostics-color=always) target_link_libraries(${ProjetName} SDL2) -target_include_directories(${ProjetName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include /usr/include/SDL2) \ No newline at end of file +target_include_directories(${ProjetName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include /usr/include/SDL2) diff --git a/Pontu/bin/Pontu b/Pontu/bin/Pontu new file mode 100755 index 0000000..26e3295 Binary files /dev/null and b/Pontu/bin/Pontu differ diff --git a/Pontu/include/model/Game.h b/Pontu/include/model/Game.h index f347edc..c85217c 100644 --- a/Pontu/include/model/Game.h +++ b/Pontu/include/model/Game.h @@ -29,7 +29,7 @@ typedef struct { int currentPlayerID; ///< The ID of the one currently playing int nb_rounds; ///< The number of rounds so far //TODO duree - State state; ///< The current state of the game + Phase phase; ///< The current state of the game Player arrPlayers[4]; ///< The array of all the players in this game Board board; ///< The board for this game } Game; diff --git a/Pontu/include/model/Player.h b/Pontu/include/model/Player.h index f979714..dd43d37 100644 --- a/Pontu/include/model/Player.h +++ b/Pontu/include/model/Player.h @@ -21,7 +21,7 @@ typedef struct { char pseudo[PSEUDO_LENMAX]; //< The player's pseudo SDL_Color color; //< The player's Piece' color int rank; //< The player's rank (0 if the player isn't out yet) -} Joueur; +} Player; /** * \brief Creates a new Player diff --git a/Pontu/src/main.c b/Pontu/src/main.c index 328a890..619350a 100644 --- a/Pontu/src/main.c +++ b/Pontu/src/main.c @@ -1,5 +1,7 @@ - +#include int main() { + + SDL_Init(SDL_INIT_EVERYTHING); return 0; } \ No newline at end of file diff --git a/Pontu/src/model/Game.c b/Pontu/src/model/Game.c index 884a220..3ec7c3f 100644 --- a/Pontu/src/model/Game.c +++ b/Pontu/src/model/Game.c @@ -5,12 +5,12 @@ Game newGame(int nbPlayers) { // In Placement phase, the last player initialized is the 1st to play g.currentPlayerID = nbPlayers - 1; g.nb_rounds = 0; - g.state = PLACEMENT; + g.phase = PLACEMENT; g.board = newBoard(nbPlayers); // red, green, blue, yellow // TODO meilleures couleurs (?) - SDL_Color colors[4] { + SDL_Color colors[4] = { {255,0 ,0 ,255}, {0 ,255,0 ,255}, {0 ,0 ,255,255},