| Summary: | There will be one extra "Please enter your move(eg: 1 3 W): " appeared after choosing map | ||
|---|---|---|---|
| Product: | CandyCrush 2020 | Reporter: | jli262-c |
| Component: | Source Code | Assignee: | jli262-c |
| Status: | CONFIRMED --- | ||
| Severity: | enhancement | ||
| Priority: | --- | ||
| Version: | 3.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Attachments: | This is the class where the bug comes from | ||
|
Description
jli262-c
2020-11-29 11:36:30 HKT
Created attachment 63 [details]
This is the class where the bug comes from
(In reply to jli262-c from comment #0) > Summary: > The bug is found after the user chooses the map he wants to play. > > Steps to Reproduce: > 1. Run the program; > 2. Input preferred map "1" > > Actual Results: > Please choose the map you want to play(eg: 1): > 2 > Refreshing the map > 1 2 3 4 5 6 7 8 > /---------------- > 1|& @ $ % 5 @ $ 2 > 2|# % $ # $ $ 1 @ > 3|& # % 1 & $ # & > 4|@ % 2 ~ ~ 4 @ & > 5|$ % & ~ ~ $ & # > 6|1 # # 3 @ % % & > 7|# & & $ & & @ # > 8|# $ # & $ % # $ > > Please enter your move(eg: 1 3 W): > Please enter your move(eg: 1 3 W): > > Expected Results: > Please choose the map you want to play(eg: 1): > 2 > Refreshing the map > 1 2 3 4 5 6 7 8 > /---------------- > 1|& @ $ % 5 @ $ 2 > 2|# % $ # $ $ 1 @ > 3|& # % 1 & $ # & > 4|@ % 2 ~ ~ 4 @ & > 5|$ % & ~ ~ $ & # > 6|1 # # 3 @ % % & > 7|# & & $ & & @ # > 8|# $ # & $ % # $ > > Please enter your move(eg: 1 3 W): The extra "Please enter your move(eg: 1 3 W): " appeared because the getUserInput() will get one "Enter" at first,which is not a valid input. There fore, add a scanner.next() to remove the "Enter", and the bug can be solved. |