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;
        }
Exemple #2
0
        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;
            }
        }
Exemple #3
0
 public RoundEndArgs(RoundOutcome outcome)
 {
     _outcome = outcome;
 }