diff --git a/src/game/morpion.cpp b/src/game/morpion.cpp index 738afac3455aa2be8ea29a4b17ed059ba24e56eb..b969dcf066de66043a949cfc4da636fca399b278 100644 --- a/src/game/morpion.cpp +++ b/src/game/morpion.cpp @@ -112,17 +112,25 @@ namespace game { //TODO: Implement } - + + + /** + * player_to_string + * Retourne X si le joueur joue les croix, O s'il joue les ronds, + * et un espace sinon. + */ string morpion::player_to_string(uint8_t player) const { - //TODO: Implement - return "TODO"; + return player == CROSS ? "X" : (player == CIRCLE ? "O" : " "); } - + + string morpion::move_to_string(uint16_t m) const { - //TODO: Implement - return "TODO"; + uint8_t row = m/3; + uint8_t col = m%3; + return "( "std::to_string(row)", "std::to_string(col)" )"; + } set<int> morpion::to_input_vector() const @@ -136,8 +144,8 @@ namespace game string morpion::to_string() const { - //TODO: Implement - return "TODO"; + for (int i = 0 + //TODO PAR ROMAIN } void morpion::playout(mt19937& engine, int max_depth)