示例#1
0
        private void RollDice()
        {
            ITurnStatus status = _game.RollDice();

            if (status.TurnErrors >= 3)
            {
                Utility.PlaySound("whah_whah.wav");
                Console.Clear();
                Console.WriteLine("You busted!\n\nPress any key to continue...");
                Console.ReadKey();
                _game.PassTurn();
            }
        }
示例#2
0
        public ActionResult <Status> RollDice()
        {
            Status result = new Status();

            try
            {
                _game.RollDice();
            }
            catch (Exception ex)
            {
                result.Message      = ex.Message;
                result.IsSuccessful = false;
            }
            return((Status)UpdateStatus(result));
        }