public void TestCreate() { GoodMoves goods = new GoodMoves(); CandidateMovesAllSorted moves = new CandidateMovesAllSorted(goods, 0); Assert.IsNotNull(moves); }
public void TestCreate() { GoodMoves goods = new GoodMoves(); CandidateMovesSelective moveFinder = new CandidateMovesSelective(goods, 0); Assert.IsNotNull(moveFinder); }
/// <summary> /// Initializes a new instance of the HexGame class, with a board size /// </summary> /// <param name="boardSize">size of the board</param> public HexGame(int boardSize) { this.board = new HexBoard(boardSize); IPathLengthFactory pathLengthFactory = new PathLengthAStarFactory(); this.xPathLength = pathLengthFactory.CreatePathLength(this.board); this.yPathLength = pathLengthFactory.CreatePathLength(this.board); this.goodMoves = new GoodMoves(); this.goodMoves.DefaultGoodMoves(boardSize, 5); }
private static Minimax MakeMinimaxForBoard(HexBoard board) { GoodMoves goodMoves = new GoodMoves(); ICandidateMoves candidateMovesFinder = new CandidateMovesAll(); Minimax result = new Minimax(board, goodMoves, candidateMovesFinder); result.GenerateDebugData = true; return(result); }
public void CountOneMoveTest() { GoodMoves goods = new GoodMoves(); CandidateMovesAllSorted moveFinder = new CandidateMovesAllSorted(goods, 0); HexBoard testBoard = new HexBoard(BoardSize); testBoard.PlayMove(5, 5, true); IEnumerable <Location> moves = moveFinder.CandidateMoves(testBoard, 0); Assert.AreEqual(BoardCellCount - 1, moves.Count()); }
public CandidateMovesSelective(GoodMoves goodMoves, int cellsPlayedCount) { this.goodMoves = goodMoves; this.cellsPlayedCount = cellsPlayedCount; }
public void TearDown() { this.goodMoves = null; }
public void SetUp() { this.goodMoves = new GoodMoves(); }
public CandidateMovesAllSorted(GoodMoves goodMoves, int cellsPlayedCount) { this.goodMoves = goodMoves; this.cellsPlayedCount = cellsPlayedCount; }