Beispiel #1
0
 public SoilInfo(int x, int y, SoilLevel sl, bool hf = false)
 {
     positionX = x;
     positionY = y;
     soilLevel = sl;
     hasFruit  = hf;
 }
    public static int GetPointAmountFromFruit(SoilLevel fruitLevel)
    {
        switch (fruitLevel)
        {
        case SoilLevel.Good:
            return(Constants.LEVEL_1_FRUIT_POINTS);

        case SoilLevel.Great:
            return(Constants.LEVEL_2_FRUIT_POINTS);

        case SoilLevel.Exuberant:
            return(Constants.LEVEL_3_FRUIT_POINTS);
        }
        throw new Exception("Invalid SoilLevel");
    }