Ejemplo n.º 1
0
        public void GenerateNewCards(Random rand)
        {
            Thread.Sleep(rand.Next(1, 17));

            int howManyCards = 100;

            while (howManyCards > 0)
            {
                BaseCards baseCard = CardShop.GetRandCard(rand);

                Console.WriteLine(baseCard.getCardName());

                string query = DbFunctions.MakeQueryForCreateNewCard(baseCard);

                if (ExecuteQuery(query) == false)
                {
                    //error weiterreichen
                    Console.WriteLine("error bei execute");
                }

                howManyCards--;
            }
        }
Ejemplo n.º 2
0
 static void PrintInformationFromOneCard(BaseCards Player1, BaseCards Player2)
 {
     Console.WriteLine($"{Player1.getCardType()}, {Player1.getElementTypes()}, {CheckCardtype(Player1)} {Player1.getCardName()}, | attacks | {Player2.getCardType()}, {Player2.getElementTypes()}, {CheckCardtype(Player2)} {Player2.getCardName()}");
 }
Ejemplo n.º 3
0
        public static string MakeQueryForCreateNewCard(BaseCards baseCard)
        {
            string temp = "Insert into cardcollection\n" +
                          "(card_uid, element_type, card_property, card_type, card_name, card_damage)\n" +
                          "VALUES\n" +
                          "('" + baseCard.getUID() + "', '" + baseCard.getElementTypes() + "', '" + baseCard.getCardProperty() + "', '" + baseCard.getCardType() + "', '" + baseCard.getCardName() + "', '" + baseCard.getCardDamage() + "');";

            return(temp);
        }