-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.java
More file actions
27 lines (24 loc) · 864 Bytes
/
Main.java
File metadata and controls
27 lines (24 loc) · 864 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
import model.Board;
import model.Game;
import model.Player;
public class Main {
public static void main(String args[]) {
Game game = new Game();
game.setBoard(new Board(3));
game.addPlayer(new Player("Player 1",game));
//game.addPlayer(new Player("Player 2",game));
// game.addPlayer(new Player("Player 3",game));
// game.addPlayer(new Player("Player 4",game));
// game.addPlayer(new Player("Player 5",game));
// game.addPlayer(new Player("Player 6",game));
//
// for(int i=10;i<100000;i++)
// game.addPlayer(new Player("Player "+i,game));
game.start();
Player winner = game.getWinner();
if (winner == null)
System.out.println("No one won");
else
System.out.println(game.getWinner().toString() + " is the winner");
}
}