예제 #1
0
        public void Parse_FieldInstruction_Player2Array()
        {
            var act = Instruction.Parse("update player2 field 0,1,2,2;0,0,0,2;3,3,3,3");
            var exp = new FieldInstruction(PlayerName.Player2, new int[, ]
            {
                { 0, 1, 2, 2 },
                { 0, 0, 0, 2 },
                { 3, 3, 3, 3 },
            });

            Assert.AreEqual(exp.ToString(), act.ToString());
        }
예제 #2
0
        public virtual void VisitField(FieldInstruction x)
        {
            x.ThisObject.VisitMe(this);

            VisitInstruction(x);
        }
예제 #3
0
        public override void VisitField(FieldInstruction x)
        {
            var thisObj = getValue(x.ThisObject);

            emit(Expression.Field(thisObj, x.Field));
        }