コード例 #1
0
        public void Parse_ThisPieceInstruction_L()
        {
            var act = Instruction.Parse("update game this_piece_type L");
            var exp = new ThisPieceInstruction(PieceType.L);

            Assert.AreEqual(exp, act);
        }
コード例 #2
0
        internal static IInstruction Parse(string[] splited)
        {
            switch (splited[2])
            {
            case "round": return(RoundInstruction.Parse(splited));

            case "this_piece_type": return(ThisPieceInstruction.Parse(splited));

            case "next_piece_type": return(NextPieceInstruction.Parse(splited));

            case "this_piece_position": return(ThisPiecePositionInstruction.Parse(splited));
            }
            return(null);
        }