diff --git a/src/game/morpion.hpp b/src/game/morpion.hpp index 09517b01186009ebba904b8506e88524caea88ff..fa0a603bb0ca9aa9d827110f554ae3db998ee22b 100644 --- a/src/game/morpion.hpp +++ b/src/game/morpion.hpp @@ -11,6 +11,8 @@ namespace game { struct morpion_state { + uint16_t cross_bitboard = 0; + uint16_t circle_bitboard = 0; uint8_t total_moves = 0; bool first_player_win = false; bool second_player_win = false; @@ -45,12 +47,11 @@ namespace game private: inline void update_win(); - inline bool has_won(uint64_t bitboard); - inline void update_moves(uint16_t move); - inline bool get(uint64_t bitboard, uint8_t i, uint8_t j) const; + inline bool has_won(uint16_t bitboard); + inline bool get(uint16_t bitboard, uint8_t i, uint8_t j) const; - const uint8_t CROSS = 0; - const uint8_t CIRCLE = 1; + const uint8_t CROSS = 1; + const uint8_t CIRCLE = 0; morpion_state state;