1
0
Fork 0

Ball - no blue colors according to constant GAME_BACKGROUND to prevent ghosting

This commit is contained in:
rxbn_ 2019-12-13 01:51:03 +01:00
parent 463b562645
commit c21af90605
1 changed files with 3 additions and 2 deletions

View File

@ -86,8 +86,9 @@ public class Ball implements IBall {
public void newRandomColor() {
Random random = new Random();
// random hue without red colors
float hue = (random.nextInt(18000) + 6000) / 10000f;
// random hue without blue colors to prevent ghosting
// 65 <~ 170/255
float hue = (random.nextInt(65)) / 100f;
// saturation between 0.5 and 0.7
float saturation = (random.nextInt(2000) + 5000) / 10000f;