bool Equals(SFigurePosition obj) { if (_x == obj._x && _y == obj._y) { return(true); } return(false); }
public bool CanMove(SFigurePosition currPos, ref Figure[,] deskGrid) { for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { var s = CheckMove(new SFigurePosition(i, j), currPos, ref deskGrid); if (s == MoveState.Can) { return(true); } } } return(false); }
public abstract MoveState CheckMove(SFigurePosition newPos, SFigurePosition currPos, ref Figure[,] deskGrid);