mirror of
https://gitlab.com/kauron/jstudy
synced 2024-12-22 08:23:33 +01:00
TestController: while to do-while
This commit is contained in:
parent
ec418ce64e
commit
e9243520e4
1 changed files with 2 additions and 1 deletions
|
@ -75,8 +75,9 @@ public class TestController implements Initializable {
|
|||
private void onSkipAction(ActionEvent event) {
|
||||
answer.setText("");
|
||||
int previous = current;
|
||||
while (list.size() > 1 && current == previous)
|
||||
do
|
||||
current = (int) (Math.random() * list.size());
|
||||
while (list.size() > 1 && current == previous);
|
||||
question.setText(list.get(current).getQuestion());
|
||||
answer.requestFocus();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue