From 906e7ced8bf24f8f2e71d0503542558f5d9f0133 Mon Sep 17 00:00:00 2001 From: Francesco Bariatti <francesco.bariatti@insa-rennes.fr> Date: Tue, 20 Oct 2015 10:57:52 +0200 Subject: [PATCH] Defined morpion state --- src/game/morpion.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/game/morpion.hpp b/src/game/morpion.hpp index 09517b0..fa0a603 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; -- GitLab