1 | package g0803.bindingofshiba.controller.end; | |
2 | ||
3 | import g0803.bindingofshiba.App; | |
4 | import g0803.bindingofshiba.controller.Controller; | |
5 | import g0803.bindingofshiba.events.IEventManager; | |
6 | import g0803.bindingofshiba.model.end.GameOver; | |
7 | import g0803.bindingofshiba.model.menu.MainMenu; | |
8 | import g0803.bindingofshiba.state.menu.MenuState; | |
9 | ||
10 | public class GameOverController extends Controller<GameOver> { | |
11 | ||
12 | private double timeToSwitch = 5D; | |
13 | ||
14 | public GameOverController(GameOver model, IEventManager eventManager) { | |
15 | super(model, eventManager); | |
16 | } | |
17 | ||
18 | @Override | |
19 | public void tick(App app, double dt) { | |
20 |
1
1. tick : Replaced double subtraction with addition → NO_COVERAGE |
timeToSwitch -= dt; |
21 | ||
22 |
2
1. tick : changed conditional boundary → NO_COVERAGE 2. tick : negated conditional → NO_COVERAGE |
if (timeToSwitch <= 0) { |
23 |
1
1. tick : removed call to g0803/bindingofshiba/App::setState → NO_COVERAGE |
app.setState(new MenuState(new MainMenu())); |
24 | } | |
25 | } | |
26 | } | |
Mutations | ||
20 |
1.1 |
|
22 |
1.1 2.2 |
|
23 |
1.1 |