equal
deleted
inserted
replaced
210 response.add(ForwardEngineMessage(vec![to_engine_msg(once(b'I'))]).send_self()); |
210 response.add(ForwardEngineMessage(vec![to_engine_msg(once(b'I'))]).send_self()); |
211 } |
211 } |
212 |
212 |
213 for (_, original_team) in &info.original_teams { |
213 for (_, original_team) in &info.original_teams { |
214 if let Some(team) = room.find_team(|team| team.name == original_team.name) { |
214 if let Some(team) = room.find_team(|team| team.name == original_team.name) { |
215 if team.color != original_team.color { |
215 if team != original_team { |
216 response.add(TeamColor(team.name.clone(), team.color).send_self()); |
216 response.add(TeamRemove(original_team.name.clone()).send_self()); |
217 } |
217 response.add(TeamAdd(team.to_protocol()).send_self()); |
218 if team.hedgehogs_number != original_team.hedgehogs_number { |
|
219 response |
|
220 .add(HedgehogsNumber(team.name.clone(), team.hedgehogs_number).send_self()); |
|
221 } |
218 } |
222 } else { |
219 } else { |
223 response.add(TeamRemove(original_team.name.clone()).send_self()); |
220 response.add(TeamRemove(original_team.name.clone()).send_self()); |
|
221 } |
|
222 } |
|
223 |
|
224 for (_, team) in &room.teams { |
|
225 if !info.original_teams.iter().any(|(_, t)| t.name == team.name) { |
|
226 response.add(TeamAdd(team.to_protocol()).send_self()); |
224 } |
227 } |
225 } |
228 } |
226 |
229 |
227 get_room_config_impl(room.config(), Destination::ToSelf, response); |
230 get_room_config_impl(room.config(), Destination::ToSelf, response); |
228 } |
231 } |