private void generateChests() {
		Random rand = new Random();
		Point[] chests = new Point[rand.nextInt(5) + 1];
		for (int i = 0; i < chests.length; i++) {
			boolean a = rand.nextBoolean();
			chests[i] = new Point();
			chests[i].x = ((a) ? rand.nextInt(w - 2) + 1 : ((rand.nextBoolean()) ? 1 : w - 2));
			chests[i].y = ((a) ? ((rand.nextBoolean()) ? 1 : h - 2) : (rand.nextInt(h - 2) + 1));

			if (level.getTile(chests[i].x + x, chests[i].y + y) != Tile.DUNGEON_BACK)
				i--;
			else {
				level.generateChest(chests[i].x + x, chests[i].y + y);
				int r = rand.nextInt(5);
				for(int j = 0; j < r; j++)
					InventoryManager.addItem("CHEST_" + (chests[i].x + x) + "_" + (chests[i].y + y), RandomItem.genRanItem());
			}
			
		}
	}