public static int ExecutePercentRoll() { DieRoll tens = new DieRoll(1, 10, 0); DieRoll ones = new DieRoll(1, 10, 0); int tenVal = tens.ExecuteRoll(); int oneVal = ones.ExecuteRoll(); if (tenVal == 10 && oneVal == 10) { return(100); } if (tenVal == 10) { tenVal = 0; } if (oneVal == 10) { oneVal = 0; } return(Int32.Parse(tenVal.ToString() + oneVal.ToString())); }
public static int ExecutePercentRoll() { DieRoll tens = new DieRoll(1, 10, 0); DieRoll ones = new DieRoll(1, 10, 0); int tenVal = tens.ExecuteRoll(); int oneVal = ones.ExecuteRoll(); if(tenVal == 10 && oneVal == 10) { return 100; } if(tenVal == 10) { tenVal = 0; } if(oneVal == 10) { oneVal = 0; } return Int32.Parse(tenVal.ToString() + oneVal.ToString()); }