コード例 #1
0
 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();
     }
 }
コード例 #2
0
 public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     return new CallCommand();
 }
コード例 #3
0
 public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     return playerController.TakeAction(data, stopIndicator);
 }
コード例 #4
0
 public IPokerCommand TakeAction(Table data, Func<bool> stopIndicator)
 {
     listener = null;
     while (listener == null)
     {
         if (stopIndicator())
         {
             return new FoldCommand();
         }
     }
     return listener;
 }