Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HandComparer"/> class.
 /// </summary>
 public HandComparer(
     IHandComparer highCardComparer,
     IHandComparer pairComparer,
     IHandComparer twoPairComparer,
     IHandComparer threeOfAKindComparer,
     IHandComparer straightComparer,
     IHandComparer flushComparer,
     IHandComparer fullHouseComparer,
     IHandComparer fourOfAKindComparer,
     IHandComparer straightFlushComparer)
 {
     _comparers = new List<IHandComparer>
         {
             straightFlushComparer,
             fourOfAKindComparer,
             fullHouseComparer,
             flushComparer,
             straightComparer,
             threeOfAKindComparer,
             twoPairComparer,
             pairComparer,
             highCardComparer
         };
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FullHouseComparer"/> class.
 /// </summary>
 /// <param name="comparer"></param>
 public FullHouseComparer(IHandComparer comparer)
 {
     _comparer = comparer;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreeOfAKindComparer"/> class.
 /// </summary>
 /// <param name="comparer"></param>
 public ThreeOfAKindComparer(IHandComparer comparer)
 {
     _comparer = comparer;
 }
Exemple #4
0
 public ShowDownApp(IDataProvider provider, IRankCalculator calculator, IHandComparer comparer)
 {
     dataProvider   = provider;
     rankCalculator = calculator;
     handComparer   = comparer;
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FlushComparer"/> class.
 /// </summary>
 /// <param name="highCardComparer"></param>
 public FlushComparer(IHandComparer highCardComparer)
 {
     _highCardComparer = highCardComparer;
 }
 public void Initialize()
 {
     builder  = new TexasHoldEmEngineBuilder();
     comparer = builder.CreateNewHandComparer();
 }
Exemple #7
0
 public ShowDown(IHandComparer comparer)
 {
     handComparer   = comparer;
     Players        = new List <Player>();
     CurrentWinners = new List <Player>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HighCardComparer"/> class.
 /// </summary>
 /// <param name="comparer"></param>
 public FourOfAKindComparer(IHandComparer comparer)
 {
     _comparer = comparer;
 }