Test two(now unfortietly with shortend id)

This commit is contained in:
2025-02-05 00:19:23 +01:00
parent faa2107a03
commit 9ce18a8242

View File

@@ -80,8 +80,9 @@ public class Main extends JPanel {
int endY = y + size * constellation.getJSONObject("end").getInt("y"); int endY = y + size * constellation.getJSONObject("end").getInt("y");
g2d.fillOval(endX-starOffset, endY-starOffset,starSize,starSize); g2d.fillOval(endX-starOffset, endY-starOffset,starSize,starSize);
g2d.setColor(new Color(0,0,0)); g2d.setColor(new Color(0,0,0));
x = (((int)(Math.random()*100)%2==0)?endX:startX); boolean b = (int) (Math.random() * 100) % 2 == 0;
y = (((int)(Math.random()*100)%2==0)?endY:startY); x = (b ?endX:startX);
y = (b ?endY:startY);
} }
endX = x; endX = x;
@@ -125,8 +126,9 @@ public class Main extends JPanel {
int endY = y + size * constellation.getJSONObject("end").getInt("y"); int endY = y + size * constellation.getJSONObject("end").getInt("y");
g2d.fillOval(endX-starOffset, endY-starOffset,starSize,starSize); g2d.fillOval(endX-starOffset, endY-starOffset,starSize,starSize);
g2d.setColor(new Color(0,0,0)); g2d.setColor(new Color(0,0,0));
x = (((int)(Math.random()*0)%2==0)?endX:startX); boolean b = (int) (Math.random() * 0) % 2 == 0;
y = (((int)(Math.random()*0)%2==0)?endY:startY); x = (b ?endX:startX);
y = (b ?endY:startY);
} }
try { try {