Exemplo n.º 1
0
        public override void ExitGame_termination(Generated.TakPGNParser.Game_terminationContext context)
        {
            if (context.DRAWN_GAME() != null)
            {
                _currentGame.ResultCode = context.DRAWN_GAME().GetText();
            }
            if (context.P1_WINS_FLATS() != null)
            {
                _currentGame.ResultCode = context.P1_WINS_FLATS().GetText();
            }
            if (context.P2_WINS_FLATS() != null)
            {
                _currentGame.ResultCode = context.P2_WINS_FLATS().GetText();
            }
            if (context.P1_WINS_ROAD() != null)
            {
                _currentGame.ResultCode = context.P1_WINS_ROAD().GetText();
            }
            if (context.P2_WINS_ROAD() != null)
            {
                _currentGame.ResultCode = context.P2_WINS_ROAD().GetText();
            }
            if (context.ASTERISK() != null)
            {
                _currentGame.ResultCode = context.ASTERISK().GetText();
            }

            base.ExitGame_termination(context);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="TakPGNParser.game_termination"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitGame_termination([NotNull] TakPGNParser.Game_terminationContext context)
 {
 }