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