-
Notifications
You must be signed in to change notification settings - Fork 0
/
HighScoresState.java
42 lines (33 loc) · 1.38 KB
/
HighScoresState.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.Carlos.spaceinvaders.State;
import com.Carlos.spaceinvaders.Game;
import com.Carlos.spaceinvaders.controller.menu.HighScoresController;
import com.Carlos.spaceinvaders.gui.LanternaGui;
import com.Carlos.spaceinvaders.model.models.HighScoresModel;
import com.Carlos.spaceinvaders.view.menu.DrawHighScores;
import java.io.IOException;
public class HighScoresState extends State<HighScoresModel>{
private DrawHighScores drawHighScores;
private HighScoresController highScoresController;
public HighScoresState(HighScoresModel highScoresModel) {
super(highScoresModel);
this.drawHighScores = new DrawHighScores(getModel());
this.highScoresController = new HighScoresController(getModel());
}
@Override
public void step(String Key, LanternaGui GUI, long Time,Game game) throws IOException {
drawHighScores.lanternaDraw(GUI);
highScoresController.toDo(game,Key, Time);
}
public void setDrawHighScores(DrawHighScores drawHighScores) {
this.drawHighScores = drawHighScores;
}
public void setHighScoresController(HighScoresController highScoresController) {
this.highScoresController = highScoresController;
}
public DrawHighScores getDrawHighScores() {
return drawHighScores;
}
public HighScoresController getHighScoresController() {
return highScoresController;
}
}