diff --git a/src/game/morpion.cpp b/src/game/morpion.cpp index b969dcf066de66043a949cfc4da636fca399b278..4a84696366e07c15e1822f874bfcc308daa5d0bf 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 state.first_player_win? 1 : (state.second_player_win? -1 : 0) + } + else if (player == CIRCLE) { + return state.second_player_win? 1 : (state.first_player_win? -1 : 0) + } return 0; }