Example #1
0
 public void OnStart( )
 {
     initBoard();
     Current = Tetromino.GetRandom();
     Next    = Tetromino.GetRandom();
     GetNewTetromino();
 }
Example #2
0
        private void GetNewTetromino( )
        {
            // Remove Current from EntityManager
            if (Current != null)
            {
                EntityManager.Entities.Remove(Current);
            }

            Current = Next;

            EntityManager.Entities.Add(Current);
            Next = Tetromino.GetRandom();

            // Check for full rows and clear them!
            for (int y = Height - 1; y > 0; y--)
            {
                // If row was full, recheck it (upper row was moved down)
                RemoveFullRow(y);
            }
        }