Here is the boolean expression that I tried to enter:
boolean finish = false;
if (GWINDOW_WIDTH == connectMe.getX()) {
finish = true;
}
System.out.println(finish);
GWINDOW_Width is the width of the window
connectMe.getX()
is the x coordinate of the dot
I tried to make it so that if the dot touches the edge of the window, the dot finishes the race. However, when running the program, the console window gives the output of "false," even though the dot touched the finish line or the edge of the screen.