示例#1
0
        public void Setup()
        {
            A.CallTo(() => _random.Next())
            .Returns(1);

            _bankService = new BingoBankService(_random, 5);
            _result1     = new List <int>
            {
                _bankService.Pull(),
                    _bankService.Pull(),
                    _bankService.Pull(),
                    _bankService.Pull(),
                    _bankService.Pull()
            };

            _bankService.Reset();

            _result2 = new List <int>
            {
                _bankService.Pull(),
                    _bankService.Pull(),
                    _bankService.Pull(),
                    _bankService.Pull(),
                    _bankService.Pull()
            };
        }
示例#2
0
        public int NextRound()
        {
            if (bingoCard == null)
            {
                return(0);
            }

            var nextNumber = _bingoBankService.Pull();

            _bingoCardService.MarkNumber(bingoCard, nextNumber);

            return(nextNumber);
        }