Esempio n. 1
0
 private PendingBranch ForkBranch(Choice choice)
 {
     var newChoicePath = new Choice[CurrentBranchChoicePath.Length + 1];
     Array.Copy(CurrentBranchChoicePath, newChoicePath, CurrentBranchChoicePath.Length);
     newChoicePath[CurrentBranchChoicePath.Length] = choice;
     return new PendingBranch { ChoicePath = newChoicePath };
 }
 private PendingBranch ForkBranch(Choice choice)
 {
     var newChoicePath = new Choice[CurrentBranchChoicePath.Length + 1];
     for (int i = 0; i < CurrentBranchChoicePath.Length; ++i)
     {
         newChoicePath[i] = CurrentBranchChoicePath[i];
     }
     newChoicePath[CurrentBranchChoicePath.Length] = choice;
     return new PendingBranch { ChoicePath = newChoicePath };
 }
Esempio n. 3
0
 private void AddResult(Game finalState, Choice[] choicePath)
 {
     m_branches.Add(new Branch { Result = finalState, ChoicePath = choicePath });
 }