Ejemplo n.º 1
0
        protected IFieldsGraph AfterMoveOn(TestFieldsGraph graphToSearch)
        {
            var actualGraph = graphToSearch.Build();

            _playersState = PlayersState.SecondIsOnTheMove();
            var phutballOptions = new PhutballOptions()
            {
                RowCount    = actualGraph.RowCount,
                ColumnCount = actualGraph.ColumnCount
            };

            RawMoveFinders = new RawMoveFinders(new MovesFactory(), _playersState, phutballOptions);
            _performMoves  = new PerformMoves(actualGraph, new NulloPlayersSwapper());
            _strategy      = GetSearchStrategy();
            _bestMove      = _strategy.Search(actualGraph);
            if (_bestMove.Move != null)
            {
                _performMoves.Perform(_bestMove.Move);
            }
            return(actualGraph);
        }
Ejemplo n.º 2
0
 public EnsureMoveIsValid(IMoveFindingStartegy realStrategy)
 {
     _realStrategy = realStrategy;
 }
Ejemplo n.º 3
0
 public EnsureMoveIsValid(IMoveFindingStartegy realStrategy)
 {
     _realStrategy = realStrategy;
 }
Ejemplo n.º 4
0
 public static IMoveFindingStartegy EnsureMoveIsValid(this IMoveFindingStartegy moveFindingStartegy)
 {
     return(new EnsureMoveIsValid(moveFindingStartegy));
 }