Ejemplo n.º 1
0
    // Use this for initialization
    public void Init()
    {
        Mino.ShadowColor = ShadowColor.ToBlockColor();
        RandomItemGenerator <MinoType> queue = new RandomItemGenerator <MinoType>(Tetromino.TETROMINO_TYPES, queueSize, queueLookback, queueTries);
        BaseTetrisBoard board = Board.Controller;

        if (AIControlled)
        {
            game = new Game(TetrisAi.CurrentState, board, queue);
        }
        else
        {
            game = new Game(InputManager, board, queue);
        }
        initialized = true;
        OnEnabled();
        game.GameStart();
        game.OnDisable();
    }