vendredi 29 septembre 2017

Is there any way to take information from strings and take them into another string?

I'm wondering if it is possible to take information from strings and get it into another string as described below:

So i have 2 modes for my application. Good against and Bad against.

These are few of string i have.

        String[] abaddon = {"abaddon", "abba","lord of avernus"};
        String[] ancientapparation = { "ancient apparition", "aa", "kaldr"};

And then I have mode 1 which i have writen out what it should write so for example

if user writes "abaddon" it will get thrown as a string and then looked for in the mode one which will find it

       else if (abaddon.Contains(vyberlow))
        {
            counter = (lina[0] +"\n" + lion[0] +"\n" + undying[0] +"\n" +outworlddestroyer[0] +"\n" + slark[0] +"\n" + axe[0] +"\n" + doombringer[0]+"\n" + ancientapparation[0]+"\n" +shadowdemon[0]+"\n");
            Console.WriteLine("\nAbaddon je slaby proti: \n\n" + counter);
        }

And there are another strings for the heroes and I need to do that mode 2 takes information from here so when user selects mode 2 and writes "lion" it will write out abaddon + others it took from all these "else ifs". Since I have about 114 different strings and I wanna use the information I already wrote for the mode 1.

I hope it makes any sense and I'm grateful for any reply.

Aucun commentaire:

Enregistrer un commentaire