forked from bee-san/AnvilHack_IV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
46 lines (34 loc) · 930 Bytes
/
Main.java
File metadata and controls
46 lines (34 loc) · 930 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
34
35
36
37
38
39
40
41
42
43
44
45
46
package game;
import java.util.Scanner;
public class Main {
private static int moveR;
private static int moveC;
private static MainGame game;
private static final int row;
private static final int col;
game = new MainGame();
public static void main(String[] args) {
// TODO Auto-generated method stub
do {
System.out.println("Current layout:");
game.printBoard();
System.out.println("Enter row");
moveR = scan.nextInt();
System.out.println("Enter column");
moveC = scan.nextInt();
game.placeMark(moveR, moveC);
do {
System.out.println("Player"+ game.getCurrentPlayer()
+ "eneter an empty row and column");
} while(game.board[row][col] < 3);
}
while (game.isWinner() != true);
scan.close();
}
//constructor
public Main() {
static Scanner scan = new Scanner(System.in);
row = 3;
col = 3;
}
}