02_cellsociety/AntAgent.java
/**
	 * Moves to first position in list
	 * @param list Of locations
	 */
Moves to first position in list
@param list Of locations
Moves to first position in list @param list Of locations
private void moveToFirst(List<Cell> list) {
		for(int k = 0; k < list.size(); k++) {
			if(((AntCell) list.get(k)).roomForAnts()) {
				((AntCell) list.get(k)).addAnt(this);
				location.removeAnt(this);
				location = (AntCell) list.get(k);
				updatePos(location);
				break;
			}
		}
	}
private void moveToFirst ( List < Cell > list ) { for ( int k = 0 ; k < list . size ( ) ; k ++ ) { if ( ( ( AntCell ) list . get ( k ) ) . roomForAnts ( ) ) { ( ( AntCell ) list . get ( k ) ) . addAnt ( this ) ; location . removeAnt ( this ) ; location = ( AntCell ) list . get ( k ) ; updatePos ( location ) ; break ; } } }
Moves to first position in list
 @param list Of locations
Moves to first position in list @param list Of locations