From 6998c1ca2a237bfe346269e746897a543f96d947 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20Gast=C3=A9?= <adrien.gaste@insa-rennes.fr>
Date: Mon, 9 Nov 2015 11:31:50 +0100
Subject: [PATCH] Implemented playout function

---
 src/game/morpion.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/game/morpion.cpp b/src/game/morpion.cpp
index 13c09b7..2d0ff85 100644
--- a/src/game/morpion.cpp
+++ b/src/game/morpion.cpp
@@ -182,7 +182,7 @@ namespace game
 	{
 		while (!end_of_game())
 		{
-			uniform_int_distribution<uint16_t> distribution(0, number_of_moves() - 1);
+			uniform_int_distribution<uint16_t> distribution(0, 8-state.total_moves);
 			uint16_t move = distribution(engine);
 			play(move);
 		}
-- 
GitLab