private KrakenMove getMaxValue(double maxValue, KrakenMove[] moves,
			double[] values,KrakenState state) {
		for (int i = 0; i < values.length; i++) {
			if (values[i]==maxValue){
				KrakenItem item = state.getValue(moves[i].getInitialPlace());
				if (item instanceof Pawn) values[i]+= Math.random() * 5 + 1;
				if (item instanceof Bishop) values[i]+= Math.random() * 0.7;
				if (item instanceof Tower) values[i]+= Math.random() * 0.5;
				if (item instanceof Queen) values[i]+= Math.random() * 0.1;
				if (item instanceof King) values[i]+= Math.random() * 0.001;
			}
		}
		return moves[getIndexOfMaxValue(values)];
	}