예제 #1
0
        private void createGameObjects(int screenWidth, int screenHeight)
        {
            Queue <IGameObject> gameObjectsStack = new Queue <IGameObject>();

            Field       field = new Field(screenWidth, screenHeight);
            Translator  translator = new Translator(field);
            FieldObject alkoman = new Alkoman(translator), pub = new Pub(translator), column = new Column(translator);

            logic = new GameLogic((Alkoman)alkoman);
            StepsViewer stepsViewer = new StepsViewer(field, logic, screenHeight / 2);

            gameObjectsStack.Enqueue(field);
            gameObjectsStack.Enqueue(alkoman);
            gameObjectsStack.Enqueue(column);
            gameObjectsStack.Enqueue(stepsViewer);
            gameObjectsStack.Enqueue(pub);

            gameObjects = gameObjectsStack.ToArray();
        }
예제 #2
0
 public GameLogic(Alkoman alkoman)
 {
     this.alkoman = alkoman;
 }