Exemplo n.º 1
0
        public void Update(CommandFactory commandFactory, IVisualizer visualizer)
        {
            var describeWorld = commandFactory.ExecuteCommand <DescribeWorld>(string.Empty);

            var world = new World(200, 200, 4);

            var rand = new Random();

            for (int i = 0; i < 100; i++)
            {
                int x    = rand.Next(200);
                int y    = rand.Next(200);
                int type = rand.Next(0, 11);

                world.AddItem(x, y, type);
            }

            visualizer.DisplayWorld(world);

            Console.WriteLine($"executed function DescribeWorld.");
            Thread.Sleep(2000);
        }