示例#1
0
        public static int Main(string[] args)
        {
            var path   = new PathToEnlightenment();
            var sensei = new Sensei(Reporter.Output);

            return(path.Walk(sensei, AnsiConsole.GetOutput()));
        }
示例#2
0
        public static int Main(string[] args)
        {
            var reporter = Reporter.Output;
            var sensei   = new Sensei(reporter);
            var path     = new PathToEnlightenment();

            return(path.Walk(sensei));
        }
示例#3
0
        public int Walk(Sensei sensei, AnsiConsole console)
        {
            try
            {
                ForEachStep(step => {
                    sensei.Observe(step.Meditate());
                });
            }
            catch (SenseiException e)
            { }

            sensei.Instruct(console);

            return(sensei.Failed() ? -1 : 0);
        }