public void setData(GameData gd) {
		
		// the towers
		for (Entry<int[], Tower> entry : gd.getTowers().entrySet()) {
			int[] pos = entry.getKey();
			Tower tower = entry.getValue();
			Tile t = map.get(pos[0] * size + pos[1]);
			Field f = (Field) t;
			tower.setField(f);
			tower.addListener(listener);
			towers.add(tower);
		}

		// the swamps
		for (Entry<int[], Swamp> entry : gd.getSwamps().entrySet()) {
			int[] pos = entry.getKey();
			Swamp s = entry.getValue();
			s.setListener(listener);
			Tile prev = map.set(pos[0] * size + pos[1], s);
			
			for (Tile t : prev.getNeighbours()){
				s.setNeighbour(t);
			}
			// tell neighbouring tiles that they have a new neighbour
			for (Tile tl : s.getNeighbours()) {
				tl.setNeighbour(s);
				tl.removeNeighbour(prev);
			}
		}
		
		// restoring the enemies
				for (Entry<int[], Enemy> entry : gd.getEnemies().entrySet()) {
					// get the values
					int[] pos = entry.getKey();
					Enemy e = entry.getValue();
					// get the tile
					Tile t = map.get(pos[0] * size + pos[1]);
					// add the enemy
					((Road) t).enter(e);
				}

		// set the MP
		MagicPower.setMP(gd.getMp());

		// set the gem
		gem = gd.getGem();
		
		//the counter
		this.counter=gd.getCounter();
	}