コード例 #1
0
 public bool CheckAllPossibilitiesToKill(IGameField field)
 {
     return
         (CheckerState.CheckPossibilityToKill(CurrentCoord, new Coord(CurrentCoord.Row + 2, CurrentCoord.Column + 2), field) ||
          CheckerState.CheckPossibilityToKill(CurrentCoord, new Coord(CurrentCoord.Row + 2, CurrentCoord.Column - 2), field) ||
          CheckerState.CheckPossibilityToKill(CurrentCoord, new Coord(CurrentCoord.Row - 2, CurrentCoord.Column - 2), field) ||
          CheckerState.CheckPossibilityToKill(CurrentCoord, new Coord(CurrentCoord.Row - 2, CurrentCoord.Column + 2), field));
 }
コード例 #2
0
ファイル: AbstractChecker.cs プロジェクト: yaoya/UGFramework
 public virtual void Reset()
 {
     _state = CheckerState.Possible;
 }
コード例 #3
0
ファイル: AbstractChecker.cs プロジェクト: yaoya/UGFramework
 protected virtual void Init()
 {
     _state = CheckerState.Possible;
 }
コード例 #4
0
ファイル: AbstractChecker.cs プロジェクト: yaoya/UGFramework
 protected virtual void OnTouchesEnd(List <TouchInfo> trackingTouchInfos, List <TouchInfo> touchInfos)
 {
     _state = CheckerState.Possible;
     _trackingTouches.Clear();
 }
コード例 #5
0
ファイル: AbstractChecker.cs プロジェクト: yaoya/UGFramework
 protected virtual void OnTouchesMoved(List <TouchInfo> trackingTouchInfos, List <TouchInfo> touchInfos)
 {
     _state = CheckerState.Checking;
 }
コード例 #6
0
ファイル: AbstractChecker.cs プロジェクト: yaoya/UGFramework
 protected virtual void OnTouchesBegan(List <TouchInfo> touchInfos)
 {
     _state = CheckerState.Began;
 }
コード例 #7
0
 public Coord MoveBackRight(int numberOfSteps)
 {
     return((CheckerState is WhiteKingCheckerState) ? CheckerState.MoveBackRight(CurrentCoord, numberOfSteps) : null);
 }
コード例 #8
0
 public Coord MoveForwardRight(int numberOfSteps)
 {
     return(CheckerState.MoveForwardRight(CurrentCoord, numberOfSteps));
 }
コード例 #9
0
 public IChecker GetVictim(Coord coord, IGameField field)
 {
     return(CheckerState.GetVictim(CurrentCoord, coord, field));
 }
コード例 #10
0
 public bool CheckPossibilityToKill(Coord coord, IGameField field)
 {
     return(CheckerState.CheckPossibilityToKill(CurrentCoord, coord, field));
 }
コード例 #11
0
 public Coord MoveBackLeft(int numberOfSteps)
 {
     return((CheckerState is BlackKingCheckerState) ? CheckerState.MoveBackLeft(CurrentCoord, numberOfSteps) : null);
 }