-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXBoxState.java
More file actions
33 lines (28 loc) · 845 Bytes
/
XBoxState.java
File metadata and controls
33 lines (28 loc) · 845 Bytes
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
/**
* @author grahammc
*
*/
public class XBoxState implements State {
private GameConsole gameConsole;
public XBoxState(GameConsole gameConsole) {
this.gameConsole = gameConsole;
}
public void pressHomeButton() {
System.out.println("\nDisplay Home Screen.");
gameConsole.setState(gameConsole.getHomeState());
}
public void pressNintendoButton() {
System.out.println("\nStarting Nintendo...");
gameConsole.setState(gameConsole.getNintendoState());
}
public void pressXBoxButton() {
System.out.println("\nYou are already viewing XBox");
}
public void pressGameButton() {
String games[] = {"Halo", "Call Of Duty", "Red Dead Redemption", "GTA 5", "Forza 4"};
System.out.println("You have the following games: ");
for (String game : games) {
System.out.println(game);
}
}
}