public bool PutStone(CellPoint point, StoneColor color) { if (rule.CanPutStoneToCell(new Stone(color), this.Board.GetCell(point))) { rule.PutStoneToCell(new Stone(color), this.Board.GetCell(point)); MoveToNextPalyer(); return(true); } return(false); }
public int[] SelectPoint(Board board) { foreach (Cell cell in board.cells) { if (rule.CanPutStoneToCell(new Stone(this.Color), cell)) { return(new int[2] { cell.Point.X, cell.Point.Y }); } } return(new int[2] { 0, 0 }); }
public int[] SelectPoint(Board board) { int maxEvaluation = 0; int[] point = new int[2]; foreach (Cell cell in board.cells) { if (rule.CanPutStoneToCell(new Stone(this.Color), cell)) { if (maxEvaluation < evaluation[cell.Point.X - 1, cell.Point.Y - 1]) { point[0] = cell.Point.X; point[1] = cell.Point.Y; } } } return(point); }