コード例 #1
0
 public static TResult Select <TResult>(this TargetBorder targetBorder, Func <TResult> upper, Func <TResult> bottom)
 {
     if (targetBorder.Name == TargetBorderEnum.UpperName)
     {
         return(upper());
     }
     return(bottom());
 }
コード例 #2
0
 public AverageBlackStoneToTargetBorderDistance(IPlayersState playersState, IFieldsGraph actualGraph, int averageDistanceWeight)
 {
     _targetBorder          = playersState.CurrentPlayer.GetTargetBorder(actualGraph);
     _originalDistance      = _targetBorder.GetDistanceFrom(actualGraph.GetWhiteField());
     _averageDistanceWeight = averageDistanceWeight;
 }
コード例 #3
0
 public WhiteStoneToBorderDistanceValue(TargetBorder winingBorder)
 {
     _winingBorder = winingBorder;
 }
コード例 #4
0
 public BlackStoneToTargetBorderCount(IPlayersState playersState, IFieldsGraph actualGraph, int goodBlackFieldsWeight)
 {
     _targetBorder          = playersState.CurrentPlayer.GetTargetBorder(actualGraph);
     _originalDistance      = _targetBorder.GetDistanceFrom(actualGraph.GetWhiteField());
     _goodBlackFieldsWeight = goodBlackFieldsWeight;
 }