public IEnumerable<Field> CurrentPlayerPlaces(IPlaceBlackStone blackStonePlacer)
 {
     var currentPlayer = _playersState.CurrentPlayer;
     var targetBorder = currentPlayer.GetTargetBorder(_fieldsGraph);
     return targetBorder.Select(() => blackStonePlacer.UpperIsTarget(_fieldsGraph),
                                () => blackStonePlacer.BottomIsTarget(_fieldsGraph))
         .Distinct()
         .Where(_fieldsGraph.CanPlaceBlackStone)
         .Select(_fieldsGraph.GetField);
 }
Exemple #2
0
        public IEnumerable <Field> CurrentPlayerPlaces(IPlaceBlackStone blackStonePlacer)
        {
            var currentPlayer = _playersState.CurrentPlayer;
            var targetBorder  = currentPlayer.GetTargetBorder(_fieldsGraph);

            return(targetBorder.Select(() => blackStonePlacer.UpperIsTarget(_fieldsGraph),
                                       () => blackStonePlacer.BottomIsTarget(_fieldsGraph))
                   .Distinct()
                   .Where(_fieldsGraph.CanPlaceBlackStone)
                   .Select(_fieldsGraph.GetField));
        }
Exemple #3
0
 public CompositeBlackStonePlacer(IPlaceBlackStone first, IPlaceBlackStone right)
 {
     _first = first;
     _right = right;
 }
 public CompositeBlackStonePlacer(IPlaceBlackStone first, IPlaceBlackStone right)
 {
     _first = first;
     _right = right;
 }