Exemple #1
0
        public void PerformAndStore(Func <IMoveFinders, IMoveFindingStartegy> chooseStrategy)
        {
            var strategy = chooseStrategy(_moveFinders);
            var bestMove = strategy.Search(_fieldsGraph);

            _movesHistory.PerformAndStore(() => _performMoves, bestMove.Move);
        }
Exemple #2
0
 private void PerformJump(Field newSelectedField, IEnumerable <Field> jumpedFields)
 {
     _movesHistory.PerformAndStore(() => _performMoves, new JumpWhiteStoneMove(_selectedField, jumpedFields, newSelectedField));
     NextState = new PlayerSelectedFieldStateMove(_phutballBoard, _playersState, newSelectedField, _movesHistory);
 }
Exemple #3
0
 private void SelectField(Field field)
 {
     _movesHistory.PerformAndStore(() => _performMoves, new SelectWhiteFieldMove(field));
     NextState = new PlayerSelectedFieldStateMove(_phutballBoard, _playersState, field, _movesHistory);
 }