Short description: In the gameStream, Test the input of user, but when input (0,9) (not in (8,8) range) the program will crash. Steps To Reproduce: Add judge of the range to the input while loop Actual Output: Input Error Expected Output: Not valid input, please input again.
Previous code: do { if (in.hasNextInt()) { start_x = in.nextInt(); start_y = in.nextInt(); } } while (!start_m.isValidStartMove()); Modified code: do { if (in.hasNextInt()) { start_x = in.nextInt(); start_y = in.nextInt(); } } while (start_x < 0 || start_x > 8 || start_y < 0 || start_y > 8);