Beispiel #1
0
        private void initializePlayers(List <foto> pics)
        {
            ExtensionMethods.niceLayout("initialziing players");
            Program.logboek.WriteLine("asking input from playerform");
            FormDataObject      data = new FormDataObject();
            AmountofPlayersForm form = new AmountofPlayersForm(pics, data);

            /******************************
             * Ask user here how many and if he wants to play with intelligent bots bl
             *******************************/

            form.ShowDialog();
            int realplayers = data.getReal();
            int coOps       = data.getCoOps();

            Program.logboek.WriteLine("real players:\t" + realplayers);
            Program.logboek.WriteLine("Robots:\t" + coOps);

            ExtensionMethods.niceLayout("Adding Players and deviding the cards");
            InitializeObjects.addPlayers(players, pics, realplayers, coOps, citylist, tracks);
            CardMethods <AbstrDestCard> .devideCards(players, LongDestDeck, NormDestDeck, trainCardDeck);

            foreach (Player player in players)
            {
                Program.logboek.WriteLine(player.ToString());
            }

            ExtensionMethods.niceLayout("remaining cards");
            Program.logboek.WriteLine(trainCardDeck.ToArray().Length + " traincards");
            Program.logboek.WriteLine(NormDestDeck.ToArray().Length + " normdestcards");
            Program.logboek.WriteLine(LongDestDeck.ToArray().Length + " longdestcards");
        }