Пример #1
0
        /// <summary>
        /// Initialize the proprietary time control
        /// </summary>
        private void InitPlayerSpan()
        {
            string strTimeControl;

            string[] arrTimeControl;
            int      iTick1;
            int      iTick2;

            m_spanWhite    = TimeSpan.Zero;
            m_spanBlack    = TimeSpan.Zero;
            strTimeControl = TimeControl;
            if (strTimeControl != null)
            {
                arrTimeControl = strTimeControl.Split(':');
                if (arrTimeControl.Length == 3 &&
                    arrTimeControl[0] == "?" &&
                    Int32.TryParse(arrTimeControl[1], out iTick1) &&
                    Int32.TryParse(arrTimeControl[2], out iTick2))
                {
                    m_spanWhite = new TimeSpan(iTick1);
                    m_spanBlack = new TimeSpan(iTick2);
                }
            }
            m_eReadAttr |= AttrReadE.WhiteSpan | AttrReadE.BlackSpan;
        }
Пример #2
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="bAttrList">    true to create an attribute list</param>
 /// <param name="bMoveList">    true to create a move list</param>
 public PgnGame(bool bAttrList, bool bMoveList)
 {
     attrs       = bAttrList ? new Dictionary <string, string>(10) : null;
     sanMoves    = bMoveList ? new List <string>(256) : null;
     m_eReadAttr = AttrReadE.None;
 }