public void SubmitRound() { Debug.Assert(m_activeSession != null, "Tried to submit a round, event though there is no active session"); if (m_activeSession == null) { return; } // check if session has ended if (m_activeSession.MaxRounds == m_activeSession.ActiveRoundIndex + 1) { // create Game Result GameResult result = new GameResult(); result.SessionName = m_activeSession.SessionName; TransmissionEndpoint endpoint = m_activeSession.TransmissionSetup.EndPoint; result.RightWord = endpoint.RealWord.ToString(endpoint.HumanLanguage); result.IsWin = endpoint.RealWord.IsEqualTo(m_activeSession.TransmissionWord); m_activeSession.MyGameResult = result; } // Increment active round index by 1 m_activeSession.ActiveRoundIndex++; // save the game SaveCurrentGame(); }
public TransmissionSetup(TransmissionWord start, TransmissionEndpoint end, Transmission[] transmissions) { StartWord = start; EndPoint = end; Transmissions = transmissions; }