private bool CheckNext(Node node)
 {
     if (NextList.Count > 0)
     {
         if (NextList.Contains(node))
         {
             return(false);
         }
         else
         {
             bool hasError = true;
             foreach (Node n in NextList)
             {
                 CheckNodeVisitor visitor = new CheckNodeVisitor();
                 n.Accept(visitor);
                 hasError = visitor.CheckNext(node);
                 if (!hasError)
                 {
                     break;
                 }
             }
             return(hasError);
         }
     }
     else
     {
         return(true);
     }
 }
Example #2
0
 public void addToMemorized()
 {
     CurrentFlashcard = NextList.First();
     NextList.RemoveAt(0);
     Memorized++;
     NotMemorized--;
 }
Example #3
0
        public void addToNotMemorized()
        {
            CurrentFlashcard = NextList.First();
            int temp = NextList[0];

            NextList.RemoveAt(0);
            NextList.Add(temp);
        }
Example #4
0
 public bool AddNext(Node node)
 {
     if (this != node)
     {
         NextList.Add(node);
         return(true);
     }
     return(false);
 }
Example #5
0
 public int getNext()
 {
     if (NextList.Count > 0)
     {
         return(NextList.First());
     }
     else
     {
         return(-1);
     }
 }
Example #6
0
 public void AddNext(Node node)
 {
     NextList.Add(node);
 }