From 2206bbd9eb137c46e55e3c2fdf344be3e75cbdb4 Mon Sep 17 00:00:00 2001
From: Francesco Bariatti <francesco.bariatti@insa-rennes.fr>
Date: Wed, 21 Oct 2015 11:21:34 +0200
Subject: [PATCH] Corrected some compilation errors

---
 src/game/morpion.cpp | 20 +++++++++++---------
 src/game/morpion.hpp |  2 +-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/game/morpion.cpp b/src/game/morpion.cpp
index 82febcc..e3445ce 100644
--- a/src/game/morpion.cpp
+++ b/src/game/morpion.cpp
@@ -73,10 +73,10 @@ namespace game
 	int morpion::value(uint8_t player) const
 	{
 		if (player == CROSS) {
-			return state.first_player_win? 1 : (state.second_player_win? -1 : 0)
+			return state.first_player_win? 1 : (state.second_player_win? -1 : 0);
 		}
 		else if (player == CIRCLE) {
-			return state.second_player_win? 1 : (state.first_player_win? -1 : 0)
+			return state.second_player_win? 1 : (state.first_player_win? -1 : 0);
 		}
 		return 0;
 	}
@@ -86,7 +86,7 @@ namespace game
 		return state.total_moves;
 	}
 
-	bool morpion::get(uint64_t bitboard, uint8_t col, uint8_t row) const
+	bool morpion::get(uint16_t bitboard, uint8_t col, uint8_t row) const
 	{
 		return bitboard & (1LL << (3*row)) << col;
 	}
@@ -112,16 +112,17 @@ namespace game
 		return false;
 	}
 
+	/*
 	void morpion::update_moves(uint16_t move)
 	{
 		//TODO: Implement
 	}
+	*/
 
-	void morpion::play(uint16_t m) // not finished
+	void morpion::play(uint16_t m)
 	{   
-		uint16_t bitboard = cross_bitboard | circle_bitboard; 
-		if(current_player() == CROSS)
-			
+		uint16_t bitboard = state.cross_bitboard | state.circle_bitboard; 
+		return;
 	}
 	
 	
@@ -140,7 +141,7 @@ namespace game
 	{
 		uint8_t row = m/3;
 		uint8_t col = m%3;
-		return "( "std::to_string(row)", "std::to_string(col)" )";
+		return "( "+std::to_string(row)+", "+std::to_string(col)+" )";
 		
 	}
 
@@ -155,8 +156,9 @@ namespace game
 
 	string morpion::to_string() const
 	{
-		for (int i = 0
+		//for (int i = 0
 		//TODO PAR ROMAIN
+		return "";
 	}
 
 	void morpion::playout(mt19937& engine, int max_depth)
diff --git a/src/game/morpion.hpp b/src/game/morpion.hpp
index b18d826..327f1b5 100644
--- a/src/game/morpion.hpp
+++ b/src/game/morpion.hpp
@@ -49,7 +49,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
-
+			
 			const uint8_t CROSS = 0;
 			const uint8_t CIRCLE = 1;
 
-- 
GitLab