public string Serialize() { StringBuilder serialized = new StringBuilder(); foreach (Player player in Players.Values) { MapParser.SerializerPlayer(player, serialized); } foreach (Paintball paintball in Paintballs) { serialized.Append(paintball.ToString()); } foreach (Obstacle obstacle in Obstacles) { serialized.Append(obstacle.ToString()); } MapObjectSerializer mos = new MapObjectSerializer(serialized); foreach (PaintballHit ph in PaintballHits) { MapParser.SerializePaintballHit(ph, serialized); // ph.Serialize(mos); } return(serialized.ToString()); }