コード例 #1
0
 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
 }
コード例 #2
0
 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
 }
コード例 #3
0
        public void Build()            //Builds out the chapter.
        {
            Architect architect;

            architect = new Architect(this);
            architect.Build();
        }
コード例 #4
0
ファイル: Choice.cs プロジェクト: cvaneseltine/NaNoGenMo2015
        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));
            }
        }
コード例 #5
0
ファイル: Choice.cs プロジェクト: cvaneseltine/NaNoGenMo2015
        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));
            }
        }
コード例 #6
0
ファイル: Option.cs プロジェクト: cvaneseltine/NaNoGenMo2015
        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();
        }
コード例 #7
0
        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();
        }
コード例 #8
0
ファイル: Ending.cs プロジェクト: cvaneseltine/NaNoGenMo2015
        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");
            }
        }
コード例 #9
0
        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");
            }
        }
コード例 #10
0
ファイル: Section.cs プロジェクト: cvaneseltine/NaNoGenMo2015
		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);
		}
コード例 #11
0
ファイル: Section.cs プロジェクト: cvaneseltine/NaNoGenMo2015
 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);
 }
コード例 #12
0
ファイル: Ending.cs プロジェクト: cvaneseltine/NaNoGenMo2015
 public Ending(Architect inbound)
     : base(inbound)
 {
 }
コード例 #13
0
 public Ending(Architect inbound) : base(inbound)
 {
 }
コード例 #14
0
 public StatCheck(Architect inbound) : base(inbound)
 {
 }
コード例 #15
0
ファイル: Chapter.cs プロジェクト: cvaneseltine/NaNoGenMo2015
        public void Build()
        {
            //Builds out the chapter.
            Architect architect;

            architect = new Architect (this);
            architect.Build ();
        }
コード例 #16
0
ファイル: Choice.cs プロジェクト: cvaneseltine/NaNoGenMo2015
 public Choice(Architect inbound) : base(inbound)
 {
 }
コード例 #17
0
 public abstract void BuildOptions(Architect inbound);
コード例 #18
0
 public SectionEnd(Architect inbound)
 {
     builder = inbound;
 }
コード例 #19
0
 public abstract void BuildOptions(Architect inbound);
コード例 #20
0
 public StatCheck(Architect inbound)
     : base(inbound)
 {
 }
コード例 #21
0
ファイル: Choice.cs プロジェクト: cvaneseltine/NaNoGenMo2015
 public Choice(Architect inbound)
     : base(inbound)
 {
 }
コード例 #22
0
 public SectionEnd(Architect inbound)
 {
     builder = inbound;
 }