Wednesday, March 04, 2009

ok introduction of my algorithm to get rid of my ant problem:


//get available ants
List ants = getAnts();

///keep running till there are no more ant's to be found
while(ants.size() > 0){

//iterate over the current available ants
for(Ant a : ants){

//we kill the current ant till it's truly dead
while(a.isDead() == false){

//actuall kill method
a.kill();
}
}

//get more ant's
ants = getAnts();
}


Ok I provided the algorithm and software solution, now somebody needs to find a hardware solution for this...

No comments: