Skip to content
Snippets Groups Projects
Commit addad0a9 authored by Romain Lebouc's avatar Romain Lebouc
Browse files

methodes move_to_string et player_to_string ajoutées. to_string à finir.

parent 906e7ced
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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