package electrosphere.game.server.ai;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author amaterasu
 */
public class AIManager {
    
    List<AI> aiList = new LinkedList();
    
    public AIManager(){
        
    }
    
    public void simulate(){
        for(AI ai : aiList){
            ai.simulate();
        }
    }
    
    public void registerAI(AI ai){
        if(!aiList.contains(ai)){
            aiList.add(ai);
        }
    }
    
    public void deregisterAI(AI ai){
        if(aiList.contains(ai)){
            aiList.remove(ai);
        }
    }
    
}
