public void UpdateRound(RoundOutcome outcome) { using (var _context = new CrapsContext()) { var currentRound = _context.Round.Where(d => d.RoundId == (int)CurrentRoundId).FirstOrDefault(); currentRound.Outcome = outcome; _context.SaveChanges(); } FinalizeRoundRolls(); CurrentRoundId = null; }
public override void OnRoundEnd(RoundOutcome outcome) { Console.WriteLine("OnRoundEnd({0})", outcome); switch (outcome) { case RoundOutcome.CorrectGuess: Score += 2; break; case RoundOutcome.WrongGuess: Score -= 4; NextPlayer(); break; } }
public RoundEndArgs(RoundOutcome outcome) { _outcome = outcome; }