public void init(GameContainer gameContainer, StateBasedGame stateBasedGame)
      throws SlickException {

    ResourceManager resourceManager = new ResourceManager();
    PlaceFactory placeFactory = new PlaceFactory();
    NPCFactory npcFactory = new NPCFactory(resourceManager);
    portBuilder = new PortBuilder(resourceManager, npcFactory, placeFactory);
    WorldBuilder worldBuilder = new WorldBuilder(resourceManager, placeFactory, this);

    MenuBuilder menuBuilder = new MenuBuilder(resourceManager);

    this.townPanel = new TownPanel(0, 0, portBuilder.buildPort(0), resourceManager, menuBuilder);
    this.seaPanel = new SeaPanel(0, 0, worldBuilder.buildWorld(), resourceManager, menuBuilder);

    gamePanel = seaPanel;

    calendar = new Calendar(new Rule(1501, 2, 27));
  }
 public void enterPort(int id) {
   townPanel.enterPort(portBuilder.buildPort(id));
   gamePanel = townPanel;
 }