private List <ISpellswordCommand> GenerateCommands() { List <ISpellswordCommand> spellList = new List <ISpellswordCommand>(); foreach (Attack attack in player.SpellList) { attack.UpdateDescription(); EmptyCommand command = new EmptyCommand(attack.Name, attack.Description); spellList.Add(command); } return(spellList); }
private List <ISpellswordCommand> UpdateCommands() { ISpellswordCommand backCommand = currentCommands.Last(); List <ISpellswordCommand> spellList = new List <ISpellswordCommand>(); foreach (Attack attack in player.SpellList) { attack.UpdateDescription(); EmptyCommand command = new EmptyCommand(attack.Name, attack.Description); spellList.Add(command); } spellList.Add(backCommand); return(spellList); //for (int i = 0; i < currentCommands.Count - 1; i++) //{ // player.SpellList[i].UpdateDescription(); // currentCommands[i] = new EmptyCommand(player.SpellList[i].Name, player.SpellList[i].Description); //} }