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++; } } }
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); }