Make pass need to test on Windows

availableIslands
Martin ROUAULT 4 years ago
parent 91af634f70
commit a705266713

@ -1,9 +1,6 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
SET(ProjetName Pontu) SET(ProjetName Pontu)
#SET(TestTargetName )
project(${ProjetName}) 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_compile_options(${ProjetName} PRIVATE ${WarningGCC} -Og -fdiagnostics-color=always)
target_link_libraries(${ProjetName} SDL2) target_link_libraries(${ProjetName} SDL2)
target_include_directories(${ProjetName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include /usr/include/SDL2) target_include_directories(${ProjetName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include /usr/include/SDL2)

Binary file not shown.

@ -29,7 +29,7 @@ typedef struct {
int currentPlayerID; ///< The ID of the one currently playing int currentPlayerID; ///< The ID of the one currently playing
int nb_rounds; ///< The number of rounds so far int nb_rounds; ///< The number of rounds so far
//TODO duree //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 Player arrPlayers[4]; ///< The array of all the players in this game
Board board; ///< The board for this game Board board; ///< The board for this game
} Game; } Game;

@ -21,7 +21,7 @@ typedef struct {
char pseudo[PSEUDO_LENMAX]; //< The player's pseudo char pseudo[PSEUDO_LENMAX]; //< The player's pseudo
SDL_Color color; //< The player's Piece' color SDL_Color color; //< The player's Piece' color
int rank; //< The player's rank (0 if the player isn't out yet) int rank; //< The player's rank (0 if the player isn't out yet)
} Joueur; } Player;
/** /**
* \brief Creates a new Player * \brief Creates a new Player

@ -1,5 +1,7 @@
#include <SDL2/SDL.h>
int main() { int main() {
SDL_Init(SDL_INIT_EVERYTHING);
return 0; return 0;
} }

@ -5,12 +5,12 @@ Game newGame(int nbPlayers) {
// In Placement phase, the last player initialized is the 1st to play // In Placement phase, the last player initialized is the 1st to play
g.currentPlayerID = nbPlayers - 1; g.currentPlayerID = nbPlayers - 1;
g.nb_rounds = 0; g.nb_rounds = 0;
g.state = PLACEMENT; g.phase = PLACEMENT;
g.board = newBoard(nbPlayers); g.board = newBoard(nbPlayers);
// red, green, blue, yellow // red, green, blue, yellow
// TODO meilleures couleurs (?) // TODO meilleures couleurs (?)
SDL_Color colors[4] { SDL_Color colors[4] = {
{255,0 ,0 ,255}, {255,0 ,0 ,255},
{0 ,255,0 ,255}, {0 ,255,0 ,255},
{0 ,0 ,255,255}, {0 ,0 ,255,255},

Loading…
Cancel
Save