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); }
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)); }
public CompositeBlackStonePlacer(IPlaceBlackStone first, IPlaceBlackStone right) { _first = first; _right = right; }