protected bool CanShift(ShiftDirectionEnum direction, int EmptyTileRowCoord, int EmptyTileColumnCoord) { switch(direction) { case ShiftDirectionEnum.LEFT: return EmptyTileColumnCoord > 0; case ShiftDirectionEnum.RIGHT: return EmptyTileColumnCoord < TilesState.columns - 1; case ShiftDirectionEnum.UP: return EmptyTileRowCoord > 0; case ShiftDirectionEnum.DOWN: return EmptyTileRowCoord < TilesState.rows - 1; default: throw new ArgumentException("Unknown direction"); } }
public ShiftEmptyTileAction(ShiftDirectionEnum shiftDirection) { this.ShiftDirection = shiftDirection; }
public ChangeActiveMazeCellAction(ShiftDirectionEnum ShiftDirection) { this.ShiftDirection = ShiftDirection; }