예제 #1
0
파일: Magesty.cs 프로젝트: selbiew/Magesty
 static void printSpell(SpellLinkedList spell)
 {
     if (spell.head.glyph == null)
     {
         Console.WriteLine("Spell is empty");
     }
     else
     {
         GlyphNode iter = spell.head;
         int       i    = 0;
         while (i < spell.length)
         {
             iter.printNode(i);
             iter = iter.next;
             i++;
         }
     }
 }
예제 #2
0
        public static string printSpell(SpellLinkedList spell)
        {
            string returnString = "";

            if (spell.head.glyph == null)
            {
                Console.WriteLine("Spell is empty");
            }
            else
            {
                GlyphNode iter = spell.head;
                int       i    = 0;
                while (i < spell.length)
                {
                    returnString += iter.printNode(i) + "\n";
                    iter          = iter.next;
                    i++;
                }
            }
            return(returnString);
        }