func TestChooseBestMove(t *testing.T) { ng.SeedRandom() logg.LogKeys["MAIN"] = true checkerlution := &Checkerlution{} checkerlution.ourTeamId = RED_TEAM checkerlution.CreateNeurgoCortex() cortex := checkerlution.cortex cortex.Run() gameState, possibleMoves := FakeGameDocument() bestMove := checkerlution.chooseBestMove(gameState, possibleMoves) logg.LogTo("TEST", "bestMove: %v", &bestMove) found := false for _, possibleMove := range possibleMoves { logg.LogTo("TEST", "possibleMove: %v", &possibleMove) if possibleMove.Equals(bestMove) { found = true } } assert.True(t, found) cortex.Shutdown() }
func main() { logg.LogKeys["MAIN"] = true ng.SeedRandom() redTeam := checkerlution.RED_TEAM game := checkerlution.NewGame(redTeam) game.GameLoop() }