示例#1
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);
        }
示例#2
0
        internal static IInstruction Parse(string[] splitted)
        {
            if (splitted.Length != 3)
            {
                return(null);
            }

            switch (splitted[1].ToUpperInvariant())
            {
            case "ROUND": return(RoundInstruction.Parse(splitted));

            case "SMALL_BLIND": return(SmallBlindInstruction.Parse(splitted));

            case "BIG_BLIND": return(BigBlindInstruction.Parse(splitted));

            case "ON_BUTTON": return(OnButtonInstruction.Parse(splitted));

            case "TABLE": return(TableInstruction.Parse(splitted));
            }
            return(null);
        }