public void SetupStateBroker()
        {
            _stateBroker = new StateBroker();

            var stars = new ObservableStateProperty <int>(10);
            var coins = new ObservableStateProperty <int>(10);

            _stateBroker.AddProperty(stars);
            _stateBroker.AddProperty(coins);

            _state = new State(stars, coins);
        }
        public void WhenAddSamePropertyTwice_ThrowsException()
        {
            _stateBroker = new StateBroker();
            var stars = new ObservableStateProperty <int>(10);

            _stateBroker.AddProperty(stars);

            Assert.Throws <Exception>(() =>
            {
                _stateBroker.AddProperty(stars);
            });
        }
        private void Init()
        {
            if (StateBroker != null)
            {
                return;
            }

            StateBroker = new StateBroker();

            var stars = new ObservableStateProperty <int>(10);
            var coins = new ObservableStateProperty <int>(10);

            StateBroker.AddProperty(stars);
            StateBroker.AddProperty(coins);

            GameState = new GameState(stars, coins);
        }