mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
New improvements
This commit is contained in:
parent
285d8a9913
commit
b1301a1bda
@ -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++) {
|
for (int i = 1; i <= 12; i++) {
|
||||||
double angle = Math.PI * 2 * (i / 12.0 - 0.25);
|
double angle = Math.PI * 2 * (i / 12.0 - 0.25);
|
||||||
int dx = centerX + (int) ((radius + 20) * Math.cos(angle)) - 4;
|
int dx = centerX + (int) ((radius + 20) * Math.cos(angle)) - 4;
|
||||||
|
@ -67,6 +67,5 @@ public class Vtipy {
|
|||||||
Font font = new Font("sans", Font.PLAIN, 16);
|
Font font = new Font("sans", Font.PLAIN, 16);
|
||||||
t.setToasterMessageFont(font);
|
t.setToasterMessageFont(font);
|
||||||
t.showToaster(array[((int) (Math.random() * ((double) array.length)))]);
|
t.showToaster(array[((int) (Math.random() * ((double) array.length)))]);
|
||||||
System.out.println("Nalezeno x vtipů: " + array.length);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user