public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     var command = System.Console.ReadLine();
     var words = command.Split(' ').ToList();
     switch (words[0])
     {
         case "call":
             return new CallCommand();
         case "fold":
             return new FoldCommand();
         case "raise":
             return new RaiseCommand(int.Parse(words[1]));
         case "check":
             return new CheckCommand();
         default:
             return new FoldCommand();
     }
 }
 public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     return new CallCommand();
 }
Example #3
0
 public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     return playerController.TakeAction(data, stopIndicator);
 }
 public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     listener = null;
     while (listener == null)
     {
         if (stopIndicator())
         {
             return new FoldCommand();
         }
     }
     return listener;
 }