Exemplo n.º 1
0
 public static int Compare(MagicMenuEntry left, MagicMenuEntry right)
 {
     return Spell.Compare(left.Spell, right.Spell);
 }
Exemplo n.º 2
0
 public static int Compare(MagicMenuEntry left, MagicMenuEntry right)
 {
     return(Spell.Compare(left.Spell, right.Spell));
 }
Exemplo n.º 3
0
        private void Squish()
        {
            int a, b, r;

            List<int> rowsToUse = new List<int>();

            for (b = 0; b < _totalRows; b++)
            {
                for (a = 0; a < COLUMNS; a++)
                {
                    if (_spells[b, a] != null)
                    {
                        rowsToUse.Add(b);
                        break;
                    }
                }
            }

            MagicMenuEntry[,] newSpells = new MagicMenuEntry[rowsToUse.Count, COLUMNS];

            r = 0;
            foreach (int i in rowsToUse)
            {
                for (int j = 0; j < COLUMNS; j++)
                {
                    newSpells[r, j] = _spells[i, j];
                }
                r++;
            }

            _spells = newSpells;

            _totalRows = rowsToUse.Count;
        }