2
This commit is contained in:
parent
ce4309fe95
commit
70f208be56
@ -202,18 +202,11 @@ class Form extends JFrame{
|
||||
return;
|
||||
}
|
||||
if (comboBoxStrategy.isEnabled()) {
|
||||
int selectedIndex = comboBoxStrategy.getSelectedIndex();
|
||||
switch (selectedIndex) {
|
||||
case 0:
|
||||
abstractStrategy = new MoveToCenter();
|
||||
break;
|
||||
case 1:
|
||||
abstractStrategy = new MoveToBorder();
|
||||
break;
|
||||
default:
|
||||
abstractStrategy = null;
|
||||
break;
|
||||
}
|
||||
abstractStrategy = switch (comboBoxStrategy.getSelectedIndex()){
|
||||
case 0 -> new MoveToCenter();
|
||||
case 1 -> new MoveToBorder();
|
||||
default -> null;
|
||||
};
|
||||
if (abstractStrategy == null) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user