Exemple #1
0
 public string getTitle(FishesInfo fishesInfo)
 {
     switch(type) {
         case Type.COUNT :
             return title + " : " + (int)(value - fishesInfo.FishesCount);
         case Type.WEIGHT :
             return title + " : " + FishesInfo.formatWeight(value - fishesInfo.getWeight());
         case Type.GROUPER :
             return title + " : " + (int)(value - fishesInfo.getCountByType(FishesInfo.GROUPER));
         case Type.REDSNAPPER :
             return title + " : " + (int)(value - fishesInfo.getCountByType(FishesInfo.REDSNAPPER));
         case Type.YELLOWFINTUNA :
             return title + " : " + (int)(value - fishesInfo.getCountByType(FishesInfo.YELLOWFINTUNA));
         case Type.DIFFERENT :
          	return title + " : " + (int)(value - fishesInfo.getDifferentFishesCount());
     }
     return title;
 }
Exemple #2
0
 public bool Check(FishesInfo fishesInfo)
 {
     switch(type) {
         case Type.COUNT :
             return (int)value <= fishesInfo.FishesCount ? true : false;
         case Type.WEIGHT :
             return value <= fishesInfo.getWeight() ? true : false;
         case Type.GROUPER :
             return (int)value <= fishesInfo.getCountByType(FishesInfo.GROUPER) ? true : false;
         case Type.REDSNAPPER :
             return (int)value <= fishesInfo.getCountByType(FishesInfo.REDSNAPPER) ? true : false;
         case Type.YELLOWFINTUNA :
             return (int)value <= fishesInfo.getCountByType(FishesInfo.YELLOWFINTUNA) ? true : false;
         case Type.DIFFERENT :
             return (int)value <= fishesInfo.getDifferentFishesCount() ? true : false;
     }
     return true;
 }