From e8ebd880b8b3e019cafcd765a84b36bad8b119fa Mon Sep 17 00:00:00 2001 From: Francesco Bariatti <francesco.bariatti@insa-rennes.fr> Date: Mon, 9 Nov 2015 11:41:54 +0100 Subject: [PATCH] hashtag it compiles --- src/game/morpion.cpp | 6 +++--- src/game/morpion.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/morpion.cpp b/src/game/morpion.cpp index 3679d16..9235c8c 100644 --- a/src/game/morpion.cpp +++ b/src/game/morpion.cpp @@ -113,7 +113,7 @@ namespace game } - void morpion::update_moves(uint16_t move) + void morpion::update_moves() { uint16_t free_bitboard = ~(state.cross_bitboard | state.circle_bitboard); for(int i = 0; i <=8; i++) @@ -121,7 +121,7 @@ namespace game if(free_bitboard & 1) { state.possible_moves += i; - state.possible_moves << 4; + state.possible_moves = state.possible_moves << 4; } free_bitboard = free_bitboard >> 1; } @@ -176,7 +176,7 @@ namespace game string result = ""; for (int row = 2; row >= 0; row--) { - result += "|" + result += "|"; for (int col = 2; col >= 0; col--) { if(((state.cross_bitboard >> 3*row) >> col) & 1) diff --git a/src/game/morpion.hpp b/src/game/morpion.hpp index 17552e4..052f505 100644 --- a/src/game/morpion.hpp +++ b/src/game/morpion.hpp @@ -50,7 +50,7 @@ namespace game inline void update_win(); //Check if someone won and update the state inline bool has_won(uint16_t bitboard); //Check if the player whose bitboard was passed as a param has won inline bool get(uint16_t bitboard, uint8_t i, uint8_t j) const; //Get a case of the board - inline void update_moves(uint16_t move); //Update the list of all possible moves + inline void update_moves(); //Update the list of all possible moves const uint8_t CROSS = 0; const uint8_t CIRCLE = 1; -- GitLab