Dodge the Rectangles game using Java