private async void MakeSuggestion() { MessageBox.Show($"You have suggested that " + SuggestionPerson + " killed the victim using the " + SuggestionWeapon + " in the " + SuggestionRoom); Model.Game.Accusation suggestion = new Model.Game.Accusation(ConvertStringToRoom(SuggestionRoom), ConvertStringToPerson(SuggestionPerson), ConvertStringToWeapon(SuggestionWeapon)); await connect.Gameplay.MakeSuggestionAsync(suggestion); }
private void MakeAccusation() { /*bool success = client.MakeAccusation(ConvertStringToPerson(AccusePerson), * ConvertStringToRoom(AccuseRoom), * ConvertStringToWeapon(AccuseWeapon));*/ MessageBox.Show($"You have accused " + AccusePerson + " of killing the victim using the " + AccuseWeapon + " in the " + AccuseRoom); Model.Game.Accusation accusation = new Model.Game.Accusation(ConvertStringToRoom(AccuseRoom), ConvertStringToPerson(AccusePerson), ConvertStringToWeapon(AccuseWeapon)); AccusationData data = connect.Gameplay.MakeAccusation(accusation); string accusationMessage = (data.accusationCorrect) ? "correct. The game is now over." : "incorrect. Gameplay will continue."; MessageBoxResult result = MessageBox.Show("Your accusation was " + accusationMessage, "Accusation Received", MessageBoxButton.YesNo); }