public Level(int w, int h) {
		width = w;
		height = h;
		tiles = new int[w * h];
		data = new int[w * h];
		subTexture = new int[w * h];
		
		Random r = new Random();
		for (int i = 0; i < w * h; i++) {
			tiles[i] = 1 + ((r.nextInt(10) == 0) ? 1 : 0);
		}
		
		for (int i = 0; i < 5; i++) {
			new DungeonGenerator(this, r.nextInt(width), r.nextInt(height), r.nextInt(10) + 7, r.nextInt(10) + 7).generate();
		}
		generateChest(0, 0);
		InventoryManager.addItem("CHEST_0_0", new FireWandItem(3), 7);
		InventoryManager.addItem("CHEST_0_0", new IceWandItem(3), 6);
		InventoryManager.addItem("CHEST_0_0", new LightningWandItem(3), 5);
		InventoryManager.addItem("CHEST_0_0", new BowItem(3), 4);
		InventoryManager.addItem("CHEST_0_0", new SpearItem(3), 3);
		InventoryManager.addItem("CHEST_0_0", new PresentItem(3), 2);
		InventoryManager.addItem("CHEST_0_0", new ShurikenItem(3), 1);
		InventoryManager.addItem("CHEST_0_0", new DungeonTeleporterItem(3));
		InventoryManager.addItem("CHEST_0_0", new PenguinWandItem(3));
		InventoryManager.addItem("CHEST_0_0", new SheepWandItem(3));
		InventoryManager.addItem("CHEST_0_0", new SlingItem(3));
		
		addEntity(new Penguin(96, 96, this));
		addEntity(new Sheep(96, 256, this));
		addEntity(new Cow(96, 115, this));
		
		tiles[3 + 5 * width] = Tile.DOOR.getId();
		subTexture[3 + 5 * width] = Tile.DUNGEON_BACK.getId();
	}