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

Defined morpion state

parent aefe25da
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
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