0

Hi I need some help with this method boolean overlaps it check to see if two plots overlap

boolean overlaps(Plot plot){ plot = new Plot(); boolean check = false; if((x<=(plot.x+plot.width)||(width+x)>=plot.x || (plot.y+plot.depth)>=y ||plot.y<(y+depth))){ check = false; } else { check = true; } return check; } }

5th Apr 2020, 2:36 AM
Angelica
Angelica - avatar
1 Answer
0
There is an extra closing brace in code. But if the problem is something else... Can you please post the full code. Because it is difficult to understand the amount of code you have posted
5th Apr 2020, 4:04 AM
XXX
XXX - avatar