Пример #1
0
        // defines the object in the game and runs the game loop
        static void Main(string[] args)
        {
            bool game_on = true;

            // generate the world
            World locale = new World(100, 100);
            gametime world_clock = new gametime();
            Console.WriteLine("new clock: " + world_clock.current_time);

            // populate teh world with our test person
            Person adam=spawnAdam(locale,world_clock);

            // add him to the world
            locale.inhabitants.Add(adam);

            // the game loop
            while (game_on)
            {
                world_clock.tick(locale.inhabitants);
            }
        }