private Cell DoMoveInternal(BoardCell boardCell, int depth, int maxWidth) { sw.Start(); BoardState state; //todo make it work. if (currentState != null && false) { var bs = currentState.BoardState; //lines are swaped - analyzis was made from 2nd viewpoint. state = new BoardState(bs.OppLines, bs.MyLines, boardCell, depth, 0, maxWidth, board); } else { state = GetBoardState(boardCell, depth, maxWidth); } if (!state.MyLines.Any()) { return(FirstMoveCase()); } //todo we may want to remember history for perf improvement GameStates.Clear(); var move = AlphaBeta(state, int.MinValue, int.MaxValue, null); LastEstimate = move.MinMax; sw.Stop(); return(move.Move); }
/// <summary> /// Efface les liste /// </summary> public void Clear() { GameStates.Clear(); }