public AtlasFrame() {
    	
    	int pace = 2000;
    	pendingN = "";
    	pendingT = null;
    	
        initComponents();
        permitVoteTaxes(false);
        permitElection(false);
        permitGoverning(false);
        permitCoup(false);
        permitNationName(false);
        permitPropose(false);
        permitTravel(false);
        permitJoin(false);
        permitNewGov(false);
        
        
        Territory miller = new Territory("Miller Plains", Terrain.Farmland, Resource.Food,82,164);
		Territory high = new Territory("Highlandwood",Terrain.Forest, Resource.Wood,147,93);
		Territory sandy = new Territory("Sandy Peak",Terrain.Mountain, Resource.Metal,297,167);
		Territory rocky = new Territory("Rocky Point",Terrain.Quarry, Resource.Stone,348,122);
		Territory hop = new Territory("Hop Fields",Terrain.Farmland, Resource.Food,424,105);
		Territory titan = new Territory("Titanius",Terrain.Mountain, Resource.Metal,486,138);
		Territory gull = new Territory("Gull Cove",Terrain.River, Resource.Water,129,176);
		Territory mount = new Territory("Mount Fortune",Terrain.Quarry, Resource.Stone,214,185);
		Territory marsh = new Territory("Marshway",Terrain.River, Resource.Water,309,272);
		Territory mine = new Territory("Mineras",Terrain.Mountain, Resource.Metal,409,251);
		Territory neu = new Territory("Neuland",Terrain.Forest, Resource.Wood,519,164);
		Territory roll = new Territory("Rolling Wheat",Terrain.Farmland, Resource.Food,491,244);
		Territory meer = new Territory("Meer",Terrain.River, Resource.Water,49,347);
		Territory copper = new Territory("Copper Valley",Terrain.Mountain, Resource.Metal,104,285);
		Territory lowland = new Territory("Lowland Glades",Terrain.Forest, Resource.Wood,136,305);
		Territory skyward = new Territory("Skyward",Terrain.Farmland, Resource.Food,240,278);
		Territory granite = new Territory("Granite Hills",Terrain.Quarry, Resource.Stone,285,329);
		Territory ocean = new Territory("Oceanfront",Terrain.River, Resource.Water,407,341);
		Territory fas = new Territory("Fasquarry",Terrain.Quarry, Resource.Stone,546,312);
		Territory far = new Territory("Farshire",Terrain.Forest, Resource.Wood,499,364);
		
		
		AtlasMap.connect(miller, high);
		AtlasMap.connect(miller, gull);
		AtlasMap.connect(high, gull);
		AtlasMap.connect(high, sandy);
		AtlasMap.connect(gull, mount);
		AtlasMap.connect(high, mount);
		AtlasMap.connect(mount, sandy);
		AtlasMap.connect(sandy, rocky);
		AtlasMap.connect(rocky, hop);
		AtlasMap.connect(hop, titan);
		AtlasMap.connect(titan, neu);
		AtlasMap.connect(neu, mine);
		AtlasMap.connect(neu, roll);
		AtlasMap.connect(mine, roll);
		AtlasMap.connect(mine, ocean);
		AtlasMap.connect(ocean, far);
		AtlasMap.connect(ocean, fas);
		AtlasMap.connect(far, fas);
		AtlasMap.connect(fas, roll);
		AtlasMap.connect(gull, copper);
		AtlasMap.connect(mount, copper);
		AtlasMap.connect(mount, skyward);
		AtlasMap.connect(mount, marsh);
		AtlasMap.connect(sandy, marsh);
		AtlasMap.connect(rocky, marsh);
		AtlasMap.connect(marsh, skyward);
		AtlasMap.connect(marsh, granite);
		AtlasMap.connect(granite, skyward);
		AtlasMap.connect(copper, lowland);
		AtlasMap.connect(skyward, lowland);
		AtlasMap.connect(copper, meer);
		AtlasMap.connect(meer, lowland);
		
		AtlasMap map = new AtlasMap("Atlas");
		map.addTerritory(meer);
		map.addTerritory(lowland);
		map.addTerritory(copper);
		map.addTerritory(gull);
		map.addTerritory(miller);
		map.addTerritory(high);
		map.addTerritory(mount);
		map.addTerritory(skyward);
		map.addTerritory(granite);
		map.addTerritory(marsh);
		map.addTerritory(sandy);
		map.addTerritory(rocky);
		map.addTerritory(hop);
		map.addTerritory(titan);
		map.addTerritory(neu);
		map.addTerritory(roll);
		map.addTerritory(mine);
		map.addTerritory(ocean);
		map.addTerritory(fas);
		map.addTerritory(far);
		
		allPlayers = new ArrayList<Player>();
		Territory t = map.randomTer();
		Player[] cps = new Player[30];
		for (int i=0; i<15; i++) {
			cps[i] = new Player("cp"+i);
			cps[i].setGround(t);
			mapPanel.addPlayer(cps[i]);
			allPlayers.add(cps[i]);
		}
		for (int i=15; i<30; i++) {
			cps[i] = new Player("cp"+i);
			cps[i].setGround(map.randomTer());
			mapPanel.addPlayer(cps[i]);
			allPlayers.add(cps[i]);
		}
		
		player = new Player();
		allPlayers.add(player);
		player.setGround(map.randomTer());
		selected = player.getGround();
		updateAdjTer();
		showTerrainInfo();
		mapPanel.setUser(player);
		repaint();
		
		Timer timer = new Timer();
        timer.schedule(new TimerTask() {

            @Override
            public void run() {
                turn();
            }
        }, 0, pace);
    }