I am making a program/simulation which builds of of the basic wombat program. Wombats are smarter and reproduce and die, it also implements a predator aspect. The predators located the prey fine, but when I tried to fix a bug (and no I am stupid and did not save the pre-bug fix code), I get an error about prey (a wombat) and (A list of wombats called) wombatsNearby.get(0) I get incompatible types error. Here is more code:
private void newPrey(){
int distance = 480;
boolean done = false;
List wombatsNearby;
while ((distance <480) && (done = false)){
wombatsNearby = (getNeighbours(distance, false, Wombat.class));
if (wombatsNearby.isEmpty()){
distance++;
}
else{
done = true;
}
}
wombatsNearby = getNeighbours(distance, false, Wombat.class);
if(done = true){
prey = wombatsNearby.get(0);
}
else{
prey = null;
}
}
If I am unclear, just tell me

