New improvements

This commit is contained in:
Robert Vokac 2024-01-27 19:04:52 +00:00
parent 285d8a9913
commit b1301a1bda
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
2 changed files with 5 additions and 1 deletions

View File

@ -174,6 +174,11 @@ public class AnalogClock extends JPanel {
//}
}
}
if(Math.random() > (1 - (1/200))) {
for(int i = 0; i<12; i++) {
colors[i] = i == 11 ? colors[0] :colors[i + 1];
}
}
for (int i = 1; i <= 12; i++) {
double angle = Math.PI * 2 * (i / 12.0 - 0.25);
int dx = centerX + (int) ((radius + 20) * Math.cos(angle)) - 4;

View File

@ -67,6 +67,5 @@ public class Vtipy {
Font font = new Font("sans", Font.PLAIN, 16);
t.setToasterMessageFont(font);
t.showToaster(array[((int) (Math.random() * ((double) array.length)))]);
System.out.println("Nalezeno x vtipů: " + array.length);
}
}