package electrosphere.net.server;

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

/**
 *
 * @author amaterasu
 */
public class PlayerManager {
    
    List<Player> playerList = new LinkedList();
    HashMap<Integer,Player> idMap = new HashMap();
    
    public PlayerManager(){
        
    }
    
    public void addPlayer(Player player){
        playerList.add(player);
        idMap.put(player.getId(),player);
    }
    
    public Player getPlayerFromId(int id){
        return idMap.get(id);
    }
    
}
