private void save(){
		if(!checked){
			checked = true;
			if(!checkPath()){
				System.err.println("Path to end of dungeon could not be found, please connect start and end 'doors'.");
				System.err.println("Dungeon has not been saved.");
				return;
			}else{
				System.out.println("Path to the end of dungeon has been found!");
				accepted = true;
			}
		}
		
		if(saved) return;
		if(!accepted) return;
		
		if(traps.size() < minTraps || spawners.size() < minSpawners){
			System.err.println("Minium trap and/or spawner requirement not met. Will place warning on screen later.");
			accepted = false;
			return;
		}
		
		String tilesStr = "";
		String trapsStr = "";
		String spawnersStr = "";
		
		for(int y = 0; y < height; y++){
			for(int x = 0; x < width; x++){
				tilesStr = tilesStr + Integer.toString(getTileInt(x, y));
			}
		}
		
		for(Trap t : traps) trapsStr = trapsStr + ".tr" + t.getId() + "t0" + "x" + t.getX() + "y" + t.getY();		
		for(Spawner s : spawners) spawnersStr = spawnersStr + ".sp" + s.getId() + "t0" + "x" + s.getX() + "y" + s.getY();		
		
		StringSelection string = new StringSelection(tilesStr);
		Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
		clipboard.setContents(string, string);
		
		System.out.println("SAVE RESULT.");
		System.out.println("uid:0");
		System.out.println(tilesStr);
		System.out.println(trapsStr);
		System.out.println(spawnersStr);
		saved = true;
		
		/*
		 * Final output string is 4kb per dungeon.
		 * 100 dungeons would be 400kb.
		 * 1,000,000 dungeons could be stored in 1GB space.
		 * Possibility to store dungeons as .txt files?
		 */
		
	}