-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNintendoState.java
More file actions
33 lines (28 loc) · 847 Bytes
/
NintendoState.java
File metadata and controls
33 lines (28 loc) · 847 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 NintendoState implements State {
private GameConsole gameConsole;
public NintendoState(GameConsole gameConsole) {
this.gameConsole = gameConsole;
}
public void pressHomeButton() {
System.out.println("\nDisplay Home Screen.");
gameConsole.setState(gameConsole.getHomeState());
}
public void pressNintendoButton() {
System.out.println("\nYou are already viewing Nintendo");
}
public void pressXBoxButton() {
System.out.println("\nStarting XBox...");
gameConsole.setState(gameConsole.getXBoxState());
}
public void pressGameButton() {
String games[] = {"Mario Party", "Super Smash Bros", "Rayman", "Megaman", "Sonic"};
System.out.println("You have the following games: ");
for (String game : games) {
System.out.println(game);
}
}
}