private int diceSize(string sizeOfDie) { int value = 0; int.TryParse(sizeOfDie.Split('d')[1], out value); return value; }