Exemple #1
0
        /// <summary>
        /// Select the routine and initialize it.
        /// </summary>
        public static void Init()
        {
            // Initialize NCurses
            _window = NCurses.InitScreen();
            NCurses.CBreak();
            NCurses.NoEcho();
            NCurses.Keypad(_window, true);

            // Pick routine, and generate its map and views
            _routine = PickRoutine();
            _routine.GenerateMap();
            _routine.CreateViews();

            // Set up viewport, defaulting to first item in views list
            _mapView = new RoutineViewport(_routine, Console.WindowWidth - 1, Console.WindowHeight - 1);
        }