public int[] getArrOfRandomPoints() { int[] finalSum = new int[6]; int[,] arrSum = new int[6, 4]; for (int i = 0; i < 6; i++) { for (int j = 0; j < 4; j++) { arrSum[i, j] = ThrowDice.ThrowOneDSix(); } int minElement = arrSum[i, 0]; int sumPoint = 0; for (int g = 0; g < 4; g++) { sumPoint += arrSum [i, g]; if (minElement > arrSum[i, g]) { minElement = arrSum[i, g]; } } finalSum [i] = sumPoint - minElement; } return(finalSum); }
public int getRandomPoint() { int[] arrSum = new int[4]; for (int j = 0; j < 4; j++) { arrSum[j] = ThrowDice.ThrowOneDSix(); } int minElement = arrSum[0]; int sumPoint = 0; for (int g = 0; g < 4; g++) { sumPoint += arrSum [g]; if (minElement > arrSum[g]) { minElement = arrSum[g]; } } return(sumPoint - minElement); }
public void addHealthAfterFirstLevel(AbstractRaces model) { model.Health += ThrowDice.ThrowDiceFromHealthDice(healthDice); model.recoveryHealth(); }