import java.util.Random; public class Dice { Random random = new Random(); private int diceRoll() { return random.nextInt(6)+1; } public void fiveRoolsHuman() { Integer[] dices1 = new Integer[5]; dices1[0] = diceRoll(); dices1[1] = diceRoll(); dices1[2] = diceRoll(); dices1[3] = diceRoll(); dices1[4] = diceRoll(); System.out.printf("%10s: ", "Ember"); for(int dice : dices1) { System.out.print(dice); System.out.print(" "); } System.out.println(); } public void fiveRoolsMachine() { Integer[] dices1 = new Integer[5]; dices1[0] = diceRoll(); dices1[1] = diceRoll(); dices1[2] = diceRoll(); dices1[3] = diceRoll(); dices1[4] = diceRoll(); System.out.printf("%10s: ", "Gép"); for(int dice : dices1) { System.out.print(dice); System.out.print(" "); } System.out.println(); } }