src/agents/AntAgent.java
/**
			 * Comparator to sort list by pheromone levels
			 */
Comparator to sort list by pheromone levels
Comparator to sort list by pheromone levels
@Override
			public int compare(Cell o1, Cell o2) {
				if(((AntCell) o2).getNestPheromones() > ((AntCell) o1).getNestPheromones()) {
					return 1;
				} else if (((AntCell) o2).getNestPheromones() == ((AntCell) o1).getNestPheromones()) {
					return 0;
				} else {
					return -1;
				}
			}
@ Override public int compare ( Cell o1 , Cell o2 ) { if ( ( ( AntCell ) o2 ) . getNestPheromones ( ) > ( ( AntCell ) o1 ) . getNestPheromones ( ) ) { return 1 ; } else if ( ( ( AntCell ) o2 ) . getNestPheromones ( ) == ( ( AntCell ) o1 ) . getNestPheromones ( ) ) { return 0 ; } else { return - 1 ; } }
Comparator to sort list by pheromone levels
Comparator to sort list by pheromone levels