public static int min(int depth, int alpha, int beta, ChessPiece[][] board) {
		if (depth == 0) return evaluate(board);
		int min = Integer.MAX_VALUE;
		Set<ChessPiece> moves;
		ChessPiece selected;
		ChessPiece old_piece;
		int score;
		
		for(int i = 0; i < 8; i++) {
			for(int j = 0; j < 8; j++) {
				selected = board[i][j];
				if(selected.color == Team.WHITE) {
					moves = selected.filterMoves(selected.getPossibleMoves(board), board);
					
					for(ChessPiece p : moves) {
						//make move
						old_piece = board[p.row][p.col];
						board[p.row][p.col] = selected;
						board[i][j] = new ChessPiece(i,j);
						selected.row = p.row;
						selected.col = p.col;
						
						score = min(depth - 1, alpha, beta, board);
						if (score < beta)
							beta = score;
						
						
						//unmake move
						board[p.row][p.col] = old_piece;
						board[i][j] = selected;
						selected.row = i;
						selected.col = j;
						
						if (score <= alpha)
							return score;
					}
				}
			}
		}
		return beta;
	}