public static Request JoinGameRequest(this GameSettings gs, bool isHost) { if (gs.IsMultiplayer()) { return new Request { JoinGame = new RequestJoinGame { Race = isHost ? gs.ParticipantRace : gs.Opponents.First(o => o.Type == PlayerType.Participant).Race, Options = gs.InterfaceOptions, SharedPort = gs.MultiplayerSharedPort, ServerPorts = gs.ServerPort(), ClientPorts = { gs.ClientPorts() } } } } ; else { return new Request { JoinGame = new RequestJoinGame { Race = gs.ParticipantRace, Options = gs.InterfaceOptions } } }; }