Bug 589

Summary: Map content does not update after input (display error)
Product: Group31Bullship Reporter: Kannachan <bullshipkanna>
Component: MapAssignee: Kobayashi <bullshipkobayashi>
Status: RESOLVED FIXED    
Severity: major    
Priority: High    
Version: Demo 1.1   
Hardware: PC   
OS: Windows   
Attachments: Screenshot of the map and console after entering input

Description Kannachan 2021-11-20 22:46:11 HKT
Created attachment 93 [details]
Screenshot of the map and console after entering input

Problem description: 
The map does not show the route from the starting point to the ending point. It has no reactions after user input.

Step to reproduce: 
1. Run Main.java.
2. Enter the starting point and the destination point with appropriate integers (1 and 4 in this case) in the console.
3. Press enter.

Actual result: 
The content of the map remains unchanged. Yet, the console seems to work well. It continues prompting the users to enter another value.

Expected result: 
After entering the inputs, the map should be updated and show the route from the starting point to the endpoint using red arrows. Users can then keep entering the value and the map will keep changing.
Comment 1 Kobayashi 2021-11-20 22:57:50 HKT
We understand the situation. The bug occurs as the main.java function is missing a line "c.paintComponent(c.getGraphics());" for updating the panel's graphic. We fixed the bug by replacing the original line of code "c.repaint()" with this line of code.