Esempio n. 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.SimpleListPage);

            Dataset    = new DataSet <DKS>();
            Classifier = new Classifier(); // Just in case; it's not actually going to get used until we've loaded the proper one.

            var Parser         = new Narrative_Parser();
            var TestHackString = "Entering the tutorial hacking sequence.[Then]Most of what you'll hear is descriptions of what you see or encounter." +
                                 "[Wait one]When your input is possible, you'll hear a sound effect cue.  For instance... [Cue Alpha1: left]This tone is the cue for a left swipe; " +
                                 "in this case let's say it's some paydata you've spotted. Note that these aren't mandatory; you're always welcome to decide the paydata isn't " +
                                 "worth getting distracted over.[Alpha1: yes]Smart aleck. Well done.[Alpha1: no]Here we go.][End Alpha1]" +
                                 "[Cue Alpha: left]Swipe left now! That's the audio cue again.[Alpha: yes]You've chased the paydata; downloading it now.[Wait four]Download complete.[Alpha: no]You've given it a " +
                                 "miss this time around.[End Alpha]This sentence will play whichever path you choose.[Cue Beta: right]This cue is for right swipe. If you swiped left " +
                                 "before, try doing nothing this time, or vice versa.[Beta: yes]Swiped right.[Beta: no]Skipped the swipe this time.[End Beta]" +
                                 "[Then]A different cue indicates you've run across an intrusion countermeasure, or ice.[Ice Gamma]This is that sound cue. Try responding with a " +
                                 "wheel sequence such as left and then up, or right and then click." +
                                 "[Gamma: success]You've beaten the ice! Congrats.|You've hacked it. Well done." +
                                 "[Gamma: fail]Maybe too casual; you failed to beat the ice. Try again.[Retry Gamma][End Gamma]" +
                                 "[Then]You've beaten the ice, but accumulated some alert status and some insight points, depending on what you picked.[Check Delta1: Alert > 25]" +
                                 "[Delta1: yes][Check Delta2: Alert > 50][Delta2: yes]Alert is over fifty.][Delta2: no]Alert is between 25 and 50.[End Delta2][Delta1: no]Alert is " +
                                 "under 25.[End Delta1][TransitionBy Gamma] to the next server node, where you find your objective: the end of the tutorial. Congrats![Disconnect]";

            NarrativeList.Current = Parser.Parse(TestHackString);
            CurrentNode           = new NarrativeNode()
            {
                NextNode = NarrativeList.Current[0]
            };
        }
Esempio n. 2
0
        public async Task DoNodeLoop()
        {
            while (!StopToken.IsCancellationRequested)
            {
                await CurrentNode.ExecuteNode();

                CurrentNode = CurrentNode.NextNode;
            }
        }