Skip to content
Snippets Groups Projects
Commit dfc1a35b authored by Le Mikael's avatar Le Mikael
Browse files

mod 1 mika

parent 906e7ced
No related branches found
No related tags found
No related merge requests found
......@@ -44,8 +44,7 @@ namespace game
bool morpion::end_of_game() const
{
//TODO: Implement
return false;
return state.first_player_win || state.second_player_win || state.total_moves == 9;
}
bool morpion::won(std::uint8_t player) const
......@@ -68,8 +67,7 @@ namespace game
uint8_t morpion::current_player() const
{
//TODO: Implement
return 0;
return state.total_moves & 1 ? CIRCLE : CROSS; // CROSS pair, CIRCLE impair
}
int morpion::value(uint8_t player) const
......@@ -80,8 +78,7 @@ namespace game
uint16_t morpion::number_of_moves() const
{
//TODO: Implement
return 0;
return state.total_moves;
}
bool morpion::get(uint64_t bitboard, uint8_t col, uint8_t row) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment