Ejemplo n.º 1
0
        public void Finish()
        {
            if (Tours.Any(t => t.Games.Any(g => !g.IsComplete)))
            {
                throw new InvalidOperationException("Stage cannot be finished! It has incomplete games!");
            }
            if (_resultCalculated)
            {
                throw new InvalidOperationException("Stage has been finished!");
            }

            Rule.SetStatuses(this);
            Result            = new StageResult(GameUnits);
            _resultCalculated = true;
        }