public static void main(String[] args) {
		
		Board board = new Board();
		MinMax mm = new MinMax();
		
		Scanner keyboard = new Scanner(System.in);
		while (true) {			
			System.out.println(board);
			
			while (true) {
				System.out.print("> ");
				String line = keyboard.nextLine();			
			
				if (line.length()==4) {
					int c = board.getC(line.substring(0, 1));
					int r = board.getR(line.substring(1, 2));
				
					int tc = board.getC(line.substring(2, 3));
					int tr = board.getR(line.substring(3, 4));
				
					if (board.isValidMove(r, c, tr, tc)) {
						board.move(r, c, tr, tc);
						break;
					} else {
						System.out.println("Invalid");
					}
				} else {
					System.out.println("Invalid");
				}
			}
			
			Move bestMove = mm.minmax(board, true);
			board.move(bestMove.getR(), bestMove.getC(), bestMove.getTr(), bestMove.getTc());
			//System.out.println(board);			
			System.out.println(bestMove);
			
			if (!true) {
				break;
			}
		}
		keyboard.close();
	}