-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun.java
32 lines (29 loc) · 821 Bytes
/
Run.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
import java.util.Scanner;
/**
* make the game run and play
* @author Setayesh
*/
public class Run {
public static void main(String[] args){
Board b = new Board();
Othello r = new Othello();
Scanner scanner = new Scanner(System.in);
boolean flag = true;
while(flag){
System.out.println(" 1 . play with computer: ");
System.out.println(" 2 . play with a friend : ");
System.out.println(" 3 . exit..");
switch (scanner.nextInt()){
case 1 :
r.onePlayer(b);
break;
case 2 :
r.twoPlayers(b);
break;
case 3 :
flag = false;
break;
}
}
}
}