private async void SubmitEntry(SurviveTheInternetPlayer player) { string entry; if (player.Text.AboveBlackBox != null && player.Text.AboveBlackBox.StartsWith("<img")) { entry = await ProvideImageTwist(player.Text, player.MaxLength); } else { entry = player.EntryId switch { "response" => await ProvideResponse(player.Text.BelowBlackBox, player.MaxLength), "twist" => await ProvideTwist(player.Text, player.MaxLength), _ => "I don't know how to respond to that" } }; LogDebug($"Submitting entry \"{entry}\"."); JackboxClient.SendEntry(entry); }
private void SubmitVote(SurviveTheInternetPlayer player) { var vote = player.EntryChoices.RandomIndex(); JackboxClient.ChooseIndex(vote); }
private void SubmitImageChoice(SurviveTheInternetPlayer player) { var choice = player.ImageChoices.RandomIndex(); JackboxClient.ChooseIndex(choice); }