Skip to content
Snippets Groups Projects
Commit c70919d0 authored by Bariatti Francesco's avatar Bariatti Francesco
Browse files

Added toString

parent d1cbcd4e
No related branches found
No related tags found
No related merge requests found
......@@ -366,8 +366,7 @@ namespace game
string penguin::move_to_string(uint16_t m) const
{
//return std::to_string((state.possible_moves >> (4 * m)) & 0xf);
return "TODO";
return std::to_string(m);
}
set<int> penguin::to_input_vector() const
......@@ -381,24 +380,26 @@ namespace game
string penguin::to_string() const
{
/*string result = "-------\n";
for (int row = 2; row >= 0; row--)
{
result += "|";
for (int col = 2; col >= 0; col--)
{
if(((state.cross_bitboard >> (3*row)) >> col) & 1)
result += player_to_string(CROSS)+"|";
else if (((state.circle_bitboard >> (3*row)) >> col) & 1)
result += player_to_string(CIRCLE)+"|";
else
result += std::to_string(row * 3 + col) + "|";
}
result += "\n-------\n";
}
string result= "--------------------";
result += "\n1 fish bro: " + std::to_string(state.one_fish);
result += "\nTwo fishes: " + std::to_string(state.two_fish);
result += "\nThree fish: " + std::to_string(state.three_fish);
result += "\nRed p1: " + std::to_string(state.p1_red);
result += "\nRed p2: " + std::to_string(state.p2_red);
result += "\nRed p3: " + std::to_string(state.p3_red);
result += "\nRed p4: " + std::to_string(state.p4_red);
result += "\nBlue p1: " + std::to_string(state.p1_blue);
result += "\nBlue p2: " + std::to_string(state.p2_blue);
result += "\nBlue p3: " + std::to_string(state.p3_blue);
result += "\nBlue p4: " + std::to_string(state.p4_blue);
result += "\nScore R: " + std::to_string(state.score_red);
result += "\nScore B: " + std::to_string(state.score_blue);
result += "\nNb possible moves R:" + std::to_string(state.nb_moves_red);
result += "\nNb possible moves B:" + std::to_string(state.nb_moves_blue);
return result;
*/
return "TODO";
}
std::uint64_t penguin::hash() 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