mirror of
https://gitlab.com/kauron/jstudy
synced 2024-12-22 16:33:33 +01:00
Test: no direct repetitions
This commit is contained in:
parent
1cf4477c10
commit
3e48c5d7eb
1 changed files with 3 additions and 1 deletions
|
@ -69,6 +69,8 @@ public class TestController implements Initializable {
|
|||
private void onSkipAction(ActionEvent event) {
|
||||
feedback.setVisible(AppConfig.showFeedback);
|
||||
answer.setText("");
|
||||
int previous = current;
|
||||
while (list.size() > 1 && current == previous)
|
||||
current = (int) (Math.random() * list.size());
|
||||
question.setText(list.get(current).getQuestion());
|
||||
answer.requestFocus();
|
||||
|
|
Loading…
Reference in a new issue