-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.java
47 lines (40 loc) · 1.43 KB
/
Menu.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
43
44
45
46
47
import usantatecla.utils.Console;
public class Menu {
private Connect4 game;
private Board board;
private Color color;
public Menu(Connect4 game, Board board, Color color){
this.board = board;
this.color = color;
this.game = game;
}
/**
* Menú para mostrar los modos de juego que tiene nuestro programa
* @return - nos devolverá la opción elegida
*/
public int chooseMode(){
Console console = new Console();
MachinePlayer machine = new MachinePlayer(board, color);
boolean out = false;
int opcion;
console.writeln("1-" + Message.BASIC_MODE.toString());
console.writeln("2-" + Message.TRAINING_MODE.toString());
console.writeln("3-" +Message.DEMO_MODE.toString());
console.writeln("4-Salir");
opcion = console.readInt(Message.MODE.toString());
switch(opcion){
case 1:
System.out.println(Message.BASIC_MODE.toString() + "select");
break;
case 2:
System.out.println(Message.TRAINING_MODE.toString() + "select");
break;
case 3:
System.out.println(Message.DEMO_MODE.toString() + "select");
break;
case 4:
break;
}
return opcion;
}
}