package pasch; import java.util.Random; public class Pasch { public static void main(String[] args) { int wuerfel1; int wuerfel2; int wuerfel3; int anzahlWuerfe = 0; while (true) { wuerfel1 = new Random().nextInt(6) + 1; wuerfel2 = new Random().nextInt(6) + 1; wuerfel3 = new Random().nextInt(6) + 1; anzahlWuerfe++; System.out.println("Wurf, " + anzahlWuerfe + " Gewuerfelt, " + wuerfel1 + ", " + wuerfel2 + ", " + wuerfel3); if (wuerfel1 == wuerfel2 && wuerfel1 == wuerfel3) { break; } } System.out.println("Pasch!"); } }