public override void BuildOptions(Architect builder) { myStat = builder.MyOutline.PickStat(); threshold = builder.CurrentStats[myStat] + (builder.MyNovel.Rand.Next(-2, 3)); myOptions.Add(new Option(builder, 1)); //One option for passing myOptions.Add(new Option(builder, 2)); //One option for failing }
public override void BuildOptions(Architect builder) { myStat = builder.MyOutline.PickStat (); threshold = builder.CurrentStats[myStat] + (builder.MyNovel.Rand.Next (-2, 3)); myOptions.Add (new Option (builder, 1)); //One option for passing myOptions.Add (new Option (builder, 2)); //One option for failing }
public void Build() //Builds out the chapter. { Architect architect; architect = new Architect(this); architect.Build(); }
public override void BuildOptions(Architect inbound) { int number; number = Rand.Next (2, 4); for (int i = 1; i <= number; i++) { myOptions.Add (new Option (builder, i)); } }
public override void BuildOptions(Architect inbound) { int number; number = Rand.Next(2, 4); for (int i = 1; i <= number; i++) { myOptions.Add(new Option(builder, i)); } }
public Option(Architect inbound, int pos) { int adjustment; builder = inbound; position = pos; adjustment = builder.MyOutline.Rand.Next (1, 3); adjustments.Add (builder.MyOutline.PickStat (), adjustment); if (builder.MyOutline.Rand.Next (0, 4) == 1) { increaseStat = false; } text = new Sentence (builder.MyNovel).ToString(); }
public Option(Architect inbound, int pos) { int adjustment; builder = inbound; position = pos; adjustment = builder.MyOutline.Rand.Next(1, 3); adjustments.Add(builder.MyOutline.PickStat(), adjustment); if (builder.MyOutline.Rand.Next(0, 4) == 1) { increaseStat = false; } text = new Sentence(builder.MyNovel).ToString(); }
public override void BuildOptions(Architect inbound) { //Okay, it isn't actually building options! Or not in the normal sense. But the concept of "what happens next" is still valid. Sentence mySentence; new Paragraph (inbound.MyNovel).ToString(); if (inbound.MyChapter.Number < inbound.MyOutline.PlannedChapters) { mySentence = new Sentence (inbound.MyNovel); text = (text + "\n\n*finish Chapter " + (inbound.MyChapter.Number + 1)); if (mySentence.WordCount < 5) { text = (text + ": " + mySentence.ToString ()); } } else { text = (text + "*finish THE END"); } }
public override void BuildOptions(Architect inbound) { //Okay, it isn't actually building options! Or not in the normal sense. But the concept of "what happens next" is still valid. Sentence mySentence; new Paragraph(inbound.MyNovel).ToString(); if (inbound.MyChapter.Number < inbound.MyOutline.PlannedChapters) { mySentence = new Sentence(inbound.MyNovel); text = (text + "\n\n*finish Chapter " + (inbound.MyChapter.Number + 1)); if (mySentence.WordCount < 5) { text = (text + ": " + mySentence.ToString()); } } else { text = (text + "*finish THE END"); } }
public Section (Architect builder) { myNovel = builder.MyNovel; myLabel = new Label (this); myPage = new Page (builder.MyChapter); builder.MyChapter.MySections.Add(this); Console.Write ("Section #"+myLabel.ID+" created by Builder #" + builder.ID + " at depth " + builder.Depth + " of " + builder.PlannedSections + ". Built "); if (builder.Depth < builder.PlannedSections-1) { if (myNovel.Rand.Next (0, builder.ChapterNumber) == 0) { myEnd = new Choice (builder); Console.WriteLine ("Choice."); } else { myEnd = new StatCheck (builder); Console.WriteLine ("StatCheck."); } } else { myEnd = new Ending (builder); Console.WriteLine ("Ending."); } myEnd.BuildOptions (builder); }
public Section(Architect builder) { myNovel = builder.MyNovel; myLabel = new Label (this); myPage = new Page (builder.MyChapter); builder.MyChapter.MySections.Add(this); Console.Write ("Section #"+myLabel.ID+" created by Builder #" + builder.ID + " at depth " + builder.Depth + " of " + builder.PlannedSections + ". Built "); if (builder.Depth < builder.PlannedSections-1) { if (myNovel.Rand.Next (0, builder.ChapterNumber) == 0) { myEnd = new Choice (builder); Console.WriteLine ("Choice."); } else { myEnd = new StatCheck (builder); Console.WriteLine ("StatCheck."); } } else { myEnd = new Ending (builder); Console.WriteLine ("Ending."); } myEnd.BuildOptions (builder); }
public Ending(Architect inbound) : base(inbound) { }
public StatCheck(Architect inbound) : base(inbound) { }
public void Build() { //Builds out the chapter. Architect architect; architect = new Architect (this); architect.Build (); }
public Choice(Architect inbound) : base(inbound) { }
public abstract void BuildOptions(Architect inbound);
public SectionEnd(Architect inbound) { builder = inbound; }