diff --git a/Pontu/include/model/Game.h b/Pontu/include/model/Game.h index 4a601c4..f347edc 100644 --- a/Pontu/include/model/Game.h +++ b/Pontu/include/model/Game.h @@ -10,7 +10,7 @@ #include "model/Player.h" #include "model/Board.h" - +#include /** * \enum Phase diff --git a/Pontu/src/model/Game.c b/Pontu/src/model/Game.c index bb20325..884a220 100644 --- a/Pontu/src/model/Game.c +++ b/Pontu/src/model/Game.c @@ -6,8 +6,22 @@ Game newGame(int nbPlayers) { g.currentPlayerID = nbPlayers - 1; g.nb_rounds = 0; g.state = PLACEMENT; - // TODO newBoard - // TODO initPlayers (avec gestion des couleurs) + g.board = newBoard(nbPlayers); + + // red, green, blue, yellow + // TODO meilleures couleurs (?) + SDL_Color colors[4] { + {255,0 ,0 ,255}, + {0 ,255,0 ,255}, + {0 ,0 ,255,255}, + {255,255,0 ,255} + }; + + // TODO récup pseudos + for (int player_i = 0; player_i < nbPlayers; player_i++) { + g.arrPlayers[player_i] = newPlayer("Pseudo",colors[player_i]); + } + return g; }