1 | package g0803.bindingofshiba.controller.menu; | |
2 | ||
3 | import g0803.bindingofshiba.App; | |
4 | import g0803.bindingofshiba.controller.Controller; | |
5 | import g0803.bindingofshiba.events.IEventManager; | |
6 | import g0803.bindingofshiba.gui.keyboard.Keyboard; | |
7 | import g0803.bindingofshiba.model.menu.Menu; | |
8 | ||
9 | public class MenuController extends Controller<Menu> { | |
10 | ||
11 | public MenuController(Menu model, IEventManager eventManager) { | |
12 | super(model, eventManager); | |
13 | } | |
14 | ||
15 | @Override | |
16 | public void tick(App app, double dt) { | |
17 | Keyboard keyboard = app.getKeyboard(); | |
18 | ||
19 |
1
1. tick : negated conditional → NO_COVERAGE |
if (keyboard.isKeyPressed(Keyboard.Key.ARROW_UP)) { |
20 |
1
1. tick : removed call to g0803/bindingofshiba/model/menu/Menu::previousOption → NO_COVERAGE |
getModel().previousOption(); |
21 |
1
1. tick : negated conditional → NO_COVERAGE |
} else if (keyboard.isKeyPressed(Keyboard.Key.ARROW_DOWN)) { |
22 |
1
1. tick : removed call to g0803/bindingofshiba/model/menu/Menu::nextOption → NO_COVERAGE |
getModel().nextOption(); |
23 |
1
1. tick : negated conditional → NO_COVERAGE |
} else if (keyboard.isKeyPressed(Keyboard.Key.SPACE) |
24 |
1
1. tick : negated conditional → NO_COVERAGE |
|| keyboard.isKeyPressed(Keyboard.Key.ENTER)) { |
25 |
1
1. tick : removed call to g0803/bindingofshiba/model/menu/MenuOption::execute → NO_COVERAGE |
getModel().getSelectedOption().execute(app); |
26 | } | |
27 | } | |
28 | } | |
Mutations | ||
19 |
1.1 |
|
20 |
1.1 |
|
21 |
1.1 |
|
22 |
1.1 |
|
23 |
1.1 |
|
24 |
1.1 |
|
25 |
1.1 |