public static bool Rotation(this IHas <IPackageLogic> package, int rotation) { if (rotation == 0 || rotation == 1) { return(true); } else if (rotation == 2 || rotation == 3) { return(package.CanTurnBack()); } else if (rotation == 4 || rotation == 5) { return(package.CanTurnSide()); } return(false); }