能不能在方块移除的几句程序后面加些注释,不大看的懂啊.谢谢
for num = 1: length( LastBlockYData )
      % 对最后一个下来的方块按行搜索 
      [YData, Index] = find( TotalYData == LastBlockYData(num) ) ;
      % 判断是否满12个(满12个为整行,可以消除)
      if length( YData ) == 12
          % 保存下行号
          CompleteLine = [CompleteLine, LastBlockYData(num)] ;
          UsefulIndex = [UsefulIndex, Index] ;          
      end            
 end
% 处理需要消除的行
if ~isempty( CompleteLine )
     % 在所有方块序列中删除这些行
     TotalXData( UsefulIndex ) = [] ;
     TotalYData( UsefulIndex ) = [] ;
     
     % 得到完成行的数目,得到相应的分数       
     LineNumber = length( CompleteLine ) ;     
     ScoreArray = [100 300 600 1000] ;
     NewScore = ScoreArray(LineNumber) ;
     % 更新总分
     CurrentScore = getappdata( handles.RussiaBlock, 'CurrentScore' ) ;
     TextString = get( handles.ScoreText, 'String' ) ;
     TextString{2} = CurrentScore + NewScore ;  
     set( handles.ScoreText, 'String', TextString ) ;
     setappdata( handles.RussiaBlock, 'CurrentScore', CurrentScore + NewScore ) ;
            
     % 更新游戏等级(如果需要的话)
     UpdateGameLevel( handles.RussiaBlock, CurrentScore + NewScore ) ;
     % 处理需要下移的方块
     for num = LineNumber : -1 : 1
           [YData, Index] = find( TotalYData > LastBlockYData(num) ) ;
                % 从下往上,逐行下移一行(20象素)
                TotalYData(Index) = TotalYData(Index) - 20 ;
            end
      end
      % 设置新的方块序列
      set( handles.BlockHandle, 'XData', TotalXData, 'YData', TotalYData ) ;
end
