public void Parse_YourBotInstruction_Player2() { var act = Instruction.Parse("Settings your_bot player2"); var exp = new YourBotInstruction(PlayerName.player2); Assert.AreEqual(exp, act); }
internal static IInstruction Parse(string[] splitted) { if (splitted.Length != 3) { return(null); } switch (splitted[1].ToUpperInvariant()) { case "HANDS_PER_LEVEL": return(HandsPerLevelInstruction.Parse(splitted)); case "STARTING_STACK": return(StartingStackInstruction.Parse(splitted)); case "TIMEBANK": return(TimeBankInstruction.Parse(splitted)); case "TIME_PER_MOVE": return(TimePerMoveInstruction.Parse(splitted)); case "YOUR_BOT": return(YourBotInstruction.Parse(splitted)); } return(null); }