Ejemplo n.º 1
0
 public int compareRecipes(IRecipe irecipe, IRecipe irecipe1)
 {
     if ((irecipe is ShapelessRecipes) && (irecipe1 is ShapedRecipes))
     {
         return(1);
     }
     if ((irecipe1 is ShapelessRecipes) && (irecipe is ShapedRecipes))
     {
         return(-1);
     }
     if (irecipe1.getRecipeSize() < irecipe.getRecipeSize())
     {
         return(-1);
     }
     return(irecipe1.getRecipeSize() <= irecipe.getRecipeSize() ? 0 : 1);
 }
Ejemplo n.º 2
0
 public int compareRecipes(IRecipe irecipe, IRecipe irecipe1)
 {
     if ((irecipe is ShapelessRecipes) && (irecipe1 is ShapedRecipes))
     {
         return 1;
     }
     if ((irecipe1 is ShapelessRecipes) && (irecipe is ShapedRecipes))
     {
         return -1;
     }
     if (irecipe1.getRecipeSize() < irecipe.getRecipeSize())
     {
         return -1;
     }
     return irecipe1.getRecipeSize() <= irecipe.getRecipeSize() ? 0 : 1;
 }