Exemplo n.º 1
0
        public TestingBlockLiner(int width, int height)
        {
            _WIDTH  = width;
            _HEIGHT = height;

            _gameArea = new Block[_WIDTH, _HEIGHT];
            _state    = new FallingState(0.5);


            _gameArea[3, 0] = new Block(3, 0, true);
            _gameArea[3, 1] = new Block(3, 1, true);
            _gameArea[3, 2] = new Block(3, 2, true);
            _gameArea[2, 0] = new Block(2, 0, true);

            _gameArea[2, 5] = new Block(2, 5);
        }
Exemplo n.º 2
0
        public BlockLinerLogic(uint width, uint height, Game gameInstance)
        {
            _randomGenerator = new Random();
            _gameInstance    = gameInstance;
            _gameArea        = new Block[width, height];

            // instantiate tetrablock pattern
            _tetraArray = new TetraBlock[]
            {
                new TetraBlockO(),
                new TetraBlockL(),
                new TetraBlockI(),
                new TetraBlockJ(),
                new TetraBlockS(),
                new TetraBlockT(),
                new TetraBlockZ()
            };

            ShuffleTetraBlock();

            // set initialization state
            _currentState = _initState;
        }
Exemplo n.º 3
0
 public void Update(GameTime delta)
 {
     _state = _state.Update(this, delta);
 }
Exemplo n.º 4
0
 public void Update(GameTime delta)
 {
     _currentState = _currentState.Update(this, delta);
 }