public int evaluateGameBoard() {
		int score = 0;
		// scores for the positions
		int mt_score = 0;
		int ps_score = 0;
		int mb_score = 0;

		for (int i = 0; i < all_pieces.size(); i++) {
			BoardPiece piece = all_pieces.get(i);
			mt_score += m_table.get(piece.piece_type);
			if (all_pieces.size() + oponents.size() > end_count_pieces) { 
				if (position_matrix.get(piece.piece_type) != null) {
					ps_score += position_matrix.get(piece.piece_type)[piece.xCoord][piece.yCoord];
				}
			}

			ArrayList<SquarePosition> squares = controller.get_attacking_pos(piece);
			for (int k = 0; k < squares.size(); k++) {
				mb_score++;
				if (squares.get(k).yCoord > side + (3 * pawn_direction)) {
					mb_score++; 
				}
			}

		}
		
		// subtract scores from the oponent
		for (int i = 0; i < oponents.size(); i++) {
			BoardPiece piece = oponents.get(i);
			mt_score -= m_table.get(piece.piece_type);
		}

		mt_score *= m_weight;
		ps_score *= position_weight;
		mb_score *= mb_weight;
		score += mt_score;
		score += ps_score;
		score += mb_score;
		// pawn structure
		int pawn_structure = evaluatePawn();
		pawn_structure *= st_weight;
		score += pawn_structure;
		// System.out.println(evalScore);
		return score;
	}