diff --git a/src/game/penguin.cpp b/src/game/penguin.cpp index 421dce698aef18e61c04cbd119ce5a63947540a4..e6f3e300169ddf294566b502dfaaa20a17530d9a 100644 --- a/src/game/penguin.cpp +++ b/src/game/penguin.cpp @@ -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