Пример #1
0
        private int m_difficulty;                            // The current difficulty of the level
        public SokobanGameTemplate()
        {
            // Storing the services
            m_stateMachine  = DependencyContainer.Instance.Resolve <IWorkerStateMachine>();
            m_levelProvider = Dependency.DependencyContainer.Instance.Resolve <ILevelProvider>();
            var ioFactory = DependencyContainer.Instance.Resolve <IOutputInputFactory>();    // Getting the factory

            m_boardDisplayer   = ioFactory.CreateDisplayer();
            m_movemnetListener = ioFactory.CreateMovementListener();
            m_levelTemplate    = new SokobanLevelTemplate(); // Creating the level template

            m_movemnetListener.Attach(this);                 // Adding the current template as an observer to the input
        }
Пример #2
0
 public Game(IBoardDisplayer boardDisplayer)
 {
     _boardDisplayer = boardDisplayer;
 }