InitializeFromGameInfo() private method

private InitializeFromGameInfo ( ) : void
return void
Exemplo n.º 1
0
Arquivo: Game.cs Projeto: serd/GoSharp
 private static void CreateGameTree(SGFGameTree root, Game p)
 {
     if (p.GameInfo != null)
     {
         foreach (var m in root.Sequence.GetRootProperties())
         {
             if (PropertyHandlers.ContainsKey(m.Name))
             {
                 PropertyHandlers[m.Name](p, m);
             }
             if (!PropertiesToExclude.Contains(m.Name))
             {
                 p.sgfProperties.Add(m);
             }
         }
         p.InitializeFromGameInfo();
     }
     foreach (var m in root.Sequence.GetProperties())
     {
         if (PropertyHandlers.ContainsKey(m.Name))
         {
             p = PropertyHandlers[m.Name](p, m);
         }
         if (!PropertiesToExclude.Contains(m.Name))
         {
             p.sgfProperties.Add(m);
         }
     }
     foreach (var r in root.GameTrees)
     {
         CreateGameTree(r, p);
     }
 }
Exemplo n.º 2
0
 private static void CreateGameTree(SGFGameTree root, Game p)
 {
     if (p.GameInfo != null)
     {
         foreach (var m in root.Sequence.GetRootProperties())
         {
             if (PropertyHandlers.ContainsKey(m.Name))
                 PropertyHandlers[m.Name](p, m);
             if (!PropertiesToExclude.Contains(m.Name))
                 p.sgfProperties.Add(m);
         }
         p.InitializeFromGameInfo();
     }
     foreach (var m in root.Sequence.GetProperties())
     {
         if (PropertyHandlers.ContainsKey(m.Name))
             p = PropertyHandlers[m.Name](p, m);
         if (!PropertiesToExclude.Contains(m.Name))
             p.sgfProperties.Add(m);
     }
     foreach (var r in root.GameTrees)
     {
         CreateGameTree(r, p);
     }
 }