diff --git a/src/game/morpion.cpp b/src/game/morpion.cpp index 738afac3455aa2be8ea29a4b17ed059ba24e56eb..b50c794ffcaf17df38ef87603301bf5f8d0b0163 100644 --- a/src/game/morpion.cpp +++ b/src/game/morpion.cpp @@ -74,7 +74,12 @@ namespace game int morpion::value(uint8_t player) const { - //TODO: Implement + if (player == CROSS) { + return first_player_win? 1 : (second_player_win? -1 : 0) + } + else if (player == CIRCLE) { + return second_player_win? 1 : (first_player_win? -1 : 0) + } return 0; }