Example #1
0
        public void Start()
        {
            tasks.Add(new Task(() => CreateDungeon(4, token)));
            tasks.AddRange(Bossess.Count((b => new Task(() => CreateDungeon(b, token)))));

            foreach (var task in tasks)
            {
                task.Start();
            }
        }
Example #2
0
        public GameModel()
        {
            var players = Generator.GetNewPlayer(10);

            Generator.GetNewItem(11);
            Generator.GetNewCharacters(10);

            foreach (var player in players)
            {
                Players.Enqueue(player);
            }

            for (int i = 0; i < 2; i++)
            {
                Bossess.Add(new Bosses(Convert.ToString(Bossess.Count), Players.Dequeue()));
            }
        }