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 ...@@ -112,17 +112,25 @@ namespace game
{ {
//TODO: Implement //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 string morpion::player_to_string(uint8_t player) const
{ {
//TODO: Implement return player == CROSS ? "X" : (player == CIRCLE ? "O" : " ");
return "TODO";
} }
string morpion::move_to_string(uint16_t m) const string morpion::move_to_string(uint16_t m) const
{ {
//TODO: Implement uint8_t row = m/3;
return "TODO"; uint8_t col = m%3;
return "( "std::to_string(row)", "std::to_string(col)" )";
} }
set<int> morpion::to_input_vector() const set<int> morpion::to_input_vector() const
...@@ -136,8 +144,8 @@ namespace game ...@@ -136,8 +144,8 @@ namespace game
string morpion::to_string() const string morpion::to_string() const
{ {
//TODO: Implement for (int i = 0
return "TODO"; //TODO PAR ROMAIN
} }
void morpion::playout(mt19937& engine, int max_depth) 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