Esempio n. 1
0
        }/* z_piracy */

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

        public static int MainFunc(ReadOnlySpan <string> args)
        {
            if (OS.ProcessArguments(args))
            {
                Buffer.InitBuffer();

                Err.InitErr();

                FastMem.InitMemory();

                Process.InitProcess();

                Sound.InitSound();

                Text.InitText();

                OS.InitScreen();

                FastMem.InitUndo();

                FastMem.ZRestart();

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

                Process.Interpret();

                FastMem.ResetMemory();

                //OS.ResetScreen();
            }
            return(0);
        }/* main */
Esempio n. 2
0
        }/* hot_key_undo */

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

        public static bool HotkeyRestart()
        {
            Text.PrintString("New game\n");

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