Beispiel #1
0
        public override object VisitDropInstruction([NotNull] RobotGrammarParser.DropInstructionContext context)
        {
            int itemId = int.Parse(VisitItemId(context.itemId()).ToString());

            Game.DropItem(itemId);
            return(0);
        }
Beispiel #2
0
        public override TreeViewItem VisitDropInstruction([NotNull] RobotGrammarParser.DropInstructionContext context)
        {
            //TreeViewItem item = new TreeViewItem();
            //item.Header = "dropInstruction";
            //item.Items.Add(new TreeViewItem().Header = context.DROPCMD().GetText()
            //                                         + " "
            //                                         + context.itemId().GetText());
            TreeViewItem newItem = new TreeViewItem();

            newItem.Header = context.DROPCMD().GetText()
                             + " "
                             + context.itemId().GetText();
            //return item;
            return(newItem);
        }