コード例 #1
0
 public void Reset()
 {
     RowFormations.Clear();
     ColumnFormations.Clear();
     AllFormations.Clear();
     AllClearedBlocks.Clear();
 }
コード例 #2
0
        public void AddFormation(Block[] formation, bool isRow)
        {
            // Check which list to add the formation to
            if (isRow == true)
            {
                RowFormations.Add(formation);
            }
            else
            {
                ColumnFormations.Add(formation);
            }

            // Add formation to all formations
            AllFormations.Add(formation);

            // Add each block in formation to all cleared blocks
            foreach (Block block in formation)
            {
                AllClearedBlocks.Add(block);
            }
        }