From f153f6e2809ec56b67efd7f6dc18d36125116725 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Tue, 17 Jul 2018 17:28:25 +0200 Subject: [PATCH] clean comments --- goTicTactoeBot.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/goTicTactoeBot.go b/goTicTactoeBot.go index 40f9dce..5cd85ec 100644 --- a/goTicTactoeBot.go +++ b/goTicTactoeBot.go @@ -61,12 +61,6 @@ func scoreTarget (tmap [3][3] int, target Coords, currentPlayer int) int{ } } - /* - * 0-0 | 0-1 | 0-2 - * 1-0 | 1-1 | 1-2 - * 2-0 | 2-1 | 2-2 - */ - alignments := [8][3]Coords{ {Coords{0,0},Coords{0,1},Coords{0,2}}, {Coords{1,0},Coords{1,1},Coords{1,2}}, @@ -95,13 +89,13 @@ func scoreTarget (tmap [3][3] int, target Coords, currentPlayer int) int{ //if it was the last cell if depth == 9 { return 0} - //test if this target prevent to loose var newPlayer int if currentPlayer == 1 { newPlayer = 2 }else{ newPlayer = 1 } + //recursion there _ ,nextScore := playOn(tmap,newPlayer) return -nextScore