public Path getBestMove(int playerColor) {
		pieces = new ArrayList<Piece>();
		cellsAvailable = new ArrayList<CellPoint>();
		cellPointsList = new TreeSet<CellPoint>();
		this.playerColor = playerColor;

		for (Piece p : player.getPieces()) {
			if (p.getColor() == playerColor) {
				pieces.add(p);
			}
		}// pieces now only contains the pieces of the given color

		for (int x = 0; x < Board.DIM; x++) {
			for (int y = 0; y < Board.DIM; y++) {
				CellPoint cell = calculateWorth(x, y);
				cellPointsList.add(cell);
				cellPoints[x][y] = cell;

				boolean available = false;
				for (int i = 0; i < pieces.size() && !available; i++) {
					Piece piece = pieces.get(i);
					if (board.canMove(x, y, piece)) {
						cellsAvailable.add(cell);
						available = true;
						// There is a move possible on the current coordinates
					}
				}
			}
		}
		// cellsAvailable contains all the CellPoints on which the given color
		// can be put

		// System.out.println("CellsAvaible:  " + cellsAvailable);
		Iterator<CellPoint> it = cellPointsList.descendingIterator();
		return getBestPath(it);
		// Set all the arrays and stuff to match the color given,
		// will now find the best path with that color.
	}