Esempio n. 1
0
        }/* z_piracy */

        /*
         * main
         *
         * Prepare and run the game.
         *
         */

        public static int MainFunc(string[] args)
        {
            if (os_.process_arguments(args))
            {
                Buffer.init_buffer();

                Err.init_err();

                FastMem.init_memory();

                Process.init_process();

                Sound.init_sound();

                Text.init_text();

                os_.init_screen();

                FastMem.init_undo();

                FastMem.z_restart();

                os_.game_started(); // New function; Called to allow the screen to know info about the game

                Process.interpret();

                FastMem.reset_memory();

                os_.reset_screen();
            }
            return(0);
        }/* main */
Esempio n. 2
0
        }/* hot_key_undo */

        /*
         * hot_key_restart
         *
         * ...allows user to start a new game.
         *
         */

        internal static bool hot_key_restart()
        {
            Text.print_string("New game\n");

            if (Input.read_yes_or_no("Do you wish to restart"))
            {
                FastMem.z_restart();
                return(true);
            }
            else
            {
                return(false);
            }
        }/* hot_key_restart */