private int writeSeaEncounters(int offset, Iterator<EncounterSet> areas) {
		while ((rom[offset] & 0xFF) != 0xFF) {
			EncounterSet encset = areas.next();
			Iterator<Encounter> encountersHere = encset.encounters.iterator();
			for (int j = 0; j < 3; j++) {
				rom[offset + 3 + (j * 2) + 1] = (byte) encountersHere.next().pokemon.number;
			}
			offset += 9;
		}
		return offset + 1;
	}