예제 #1
0
 protected override void AdministerExam()
 {
     Asker.GetChoiceFromList("If you need to provide food for ovr 7 people, what is a good food to provide?", new List <string>
     {
         "Wheat",
         "Dark Food",
         "Chewy"
     });
 }
예제 #2
0
 protected override void AdministerExam()
 {
     Asker.GetChoiceFromList("If you're driving a train 1000 mph and you hit a cow, what will happen?", new List <string>
     {
         "The cow will be angry",
         "The trail will explode",
         "You will rejoice",
         "All of the above"
     });
 }
 public MapEditorGuiScreen(InputHandler Input, GBitmap screen)
     : base(Input, false, false, false, false)
 {
     _asker = new Asker(Input, "Save map before exit?", new string[] { "yes", "no", "cencel" });
     _asker.SetCallback(0, _askerYes);
     _asker.SetCallback(1, _askerNo);
     _asker.SetCallback(2, _askerCencel);
     Screen             = screen;
     NonClearableScreen = true;
 }
예제 #4
0
    static void Main(string[] args)
    {
        Console.Write("Enter the name of the story file: ");
        string filename = Console.ReadLine();


        Asker  ask         = new Asker();
        string newSentence = ask.asker(filename);

        Console.WriteLine(newSentence);
        string name = Console.ReadLine();
    }
예제 #5
0
파일: Game.cs 프로젝트: TomasMike/TG
        public void DuringDay()
        {
            // if all passed go to end of day
            if (playersWhoPassedThisDay.Count == Players.Count)
            {
                TGLogger.LogToConsole("All players passed. Jumping to end of day phase.");
                EndOfDay();
            }
            else
            {
                Round++;

                if (Players.Count > 1)
                {
                    // ries kto bol toto kolo, ked vsetci zacni dalsie kolo a kto passol uz
                    var possiblePlayersToBeActivePlayer = Players.Select(_ => _.PlayerNumber).ToList();
                    possiblePlayersToBeActivePlayer.RemoveAll(_ => playersWhoActedThisRound.Contains(_));
                    possiblePlayersToBeActivePlayer.RemoveAll(_ => playersWhoPassedThisDay.Contains(_));

                    if (possiblePlayersToBeActivePlayer.Count == 0)
                    {
                        //next round
                        playersWhoActedThisRound.Clear();
                        TGLogger.LogToConsole("All players who didnt pass, acted this round. Next round starts.");
                        DuringDay();
                        return;
                    }
                    else if (possiblePlayersToBeActivePlayer.Count == 1)
                    {
                        Instance.ActivePlayerNumber = possiblePlayersToBeActivePlayer[0];
                        TGLogger.LogToConsole($"{Instance.ActivePlayerNumber} is the last player who didnt act this round, hes the active player now.");
                    }
                    else
                    {
                        Instance.ActivePlayerNumber =
                            Asker.Ask(
                                "Who will be next active player?",
                                possiblePlayersToBeActivePlayer.Select(_ => new Option <PlayerNumber>(_))).InnerOption;
                    }
                    //
                }
                else
                {
                    //singleplayer
                    Instance.ActivePlayerNumber = PlayerNumber.Player1;
                    //MessageBox.Show("SinglePlayer");
                }
                _MainForm.Instance.Text = $"Active Player:{Instance.ActivePlayer.Name}";
                StartNextPlayerTurn();
            }
        }
예제 #6
0
        public GuiScreen(InputHandler Input, bool renderTitle, bool renderTip, bool requiresQuit, bool forbidReturning)
        {
            if (requiresQuit)
            {
                this.AskPopUp = new Asker(Input, "really quit?", new string[] { "yes", "nope" });
                AskPopUp.SetBgTransparency(255);
            }

            this.NonClearableScreen = false;
            this.Input           = Input;
            this.RenderTitle     = renderTitle;
            this.RenderTip       = renderTip;
            this.ForbidReturning = forbidReturning;
        }
예제 #7
0
        public static void StartExploration(ExplorationScenario scenario)
        {
            Action <ScenarioParagraph> loop = null;

            loop = (par) =>
            {
                ParagraphOption pickedParagraphOption;

                if (par.ForcedOptions?.Any(_ => _.Check(null)) ?? false)
                {
                    MessageBox.Show(par.Text + (string.IsNullOrEmpty(par.AdditionalText) ? "" : "\r\n" + par.AdditionalText));

                    var fo = par.ForcedOptions.First(_ => _.Check(null));
                    if (fo is ForceScenarioParagraphForcedOption)
                    {
                        pickedParagraphOption = par.ParagraphOptions
                                                .First(_ => _.ParagraphNumToRedirectToAfter == ((ForceScenarioParagraphForcedOption)fo).RedirectToParagraphNum);
                    }
                    else
                    {
                        throw new NotImplementedException();
                    }
                }
                else
                {
                    //par.PreParagraphChoiceEffect?.

                    //if ()
                    pickedParagraphOption = Asker.Ask(par.Text, par.ParagraphOptions
                                                      .Where(po => po.OptionCondition == null ? true : po.OptionCondition(GetEventArgs)));
                }

                var nextParagraph = pickedParagraphOption.ParagraphNumToRedirectToAfter;

                if (nextParagraph == -1)
                {
                    //end
                }
                else
                {
                    loop(nextParagraph == 0 ? scenario.IntroParagraph : scenario.Options.First(_ => _.VerseNumber == nextParagraph));
                }
            };

            loop(scenario.IntroParagraph);
        }
예제 #8
0
    // Use this for initialization
    void Start()
    {
        this.transform.Find("Model3D").Find("Eye").gameObject.SetActive(false);
        pivot = transform.Find("Pivot");
        inf   = this.GetComponent <Informer>();
        ask   = this.GetComponent <Asker>();
        sol   = this.GetComponent <Solutioner>();
        ul    = this.GetComponent <Unlocker>();
        inq   = this.GetComponent <Inquisitor>();
        if (sol != null)
        {
            message.transform.Find("Text").GetComponent <TextMesh>().text = sol.answer;
        }

        this.name = data.name;
        message.SetActive(false);
    }
예제 #9
0
        public static void Initializer(CrudContext context)
        {
            context.Database.EnsureCreated();
            if (context.askers.Any())
            {
                return;
            }
            var askerim = new Asker[] {
                new Asker {
                    Name = "Ali", Surname = "Orta", Yas = 20, Aktif = true
                },
                new Asker {
                    Name = "Veli", Surname = "Sel", Yas = 22, Aktif = true
                }
            };

            foreach (var asker in askerim)
            {
                context.askers.Add(asker);
            }
            context.SaveChanges();
        }
예제 #10
0
 protected override void ConductInterview()
 {
     Asker.GetValue <string>("If you had an account that was messy, how would you clean it up?");
     Asker.GetValue <string>("What is the neatest account you ever worked with?");
 }
예제 #11
0
 protected override void ConductInterview()
 {
     Asker.GetValue <string>("What are your strengths with trains?");
     Asker.GetValue <string>("Did you ever drive a train? If so, what did you think of that?");
 }
예제 #12
0
 protected override void ConductInterview()
 {
     Asker.GetValue <string>("What food do you eat in a day?");
     Asker.GetValue <string>("What do you think of large food?");
 }