All pastes #368684 Raw Edit

Mine

public text v1 · immutable
#368684 ·published 2007-02-23 07:38 UTC
rendered paste body
/*
 * World.java
 *
 * Created on February 20, 2007, 8:39 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package smj.world;

import java.util.*;

/**
 *
 * @author kcbanner
 */
public class World {
    
    private Map<String, PlayerEntity> playerMap;
    
    /** Creates a new instance of World */
    public World() {
        
        // Create the HashMap of Players:
        // key is the player username, value is the PlayerEntity object
        // This holds *all* the players in the server that we know about
        Map<String, PlayerEntity> playerMap = new HashMap<String, PlayerEntity>();
                       
    }
    
    public void addPlayer(String username, PlayerEntity player) {
        this.playerMap.put(username, player);
    }
    
}