SHOW:
|
|
- or go back to the newest paste.
1 | diff --git a/Hand Evaluator/HandEvaluator/PocketHands.cs b/Hand Evaluator/HandEvaluator/PocketHands.cs | |
2 | - | index 2bf5c76..7f03a9f 100644 |
2 | + | index 2bf5c76..8172f7b 100644 |
3 | --- a/Hand Evaluator/HandEvaluator/PocketHands.cs | |
4 | +++ b/Hand Evaluator/HandEvaluator/PocketHands.cs | |
5 | @@ -3958,7 +3958,7 @@ namespace HoldemHand | |
6 | static public PocketHands PocketCards169(string pocket) | |
7 | { | |
8 | PocketHands retval = new PocketHands(); | |
9 | - if (pocket.Length == 3 && pocket[2] == '*') | |
10 | + if ((pocket.Length == 2 && pocket[0] != pocket[1]) || (pocket.Length == 3 && pocket[2] == '*')) | |
11 | { | |
12 | ||
13 | retval |= _Pocket169Combinations[(int)Pocket169(string.Format("{0}{1}s", pocket[0], pocket[1]))]; | |
14 | @@ -4151,7 +4151,7 @@ namespace HoldemHand | |
15 | static public PocketHands PocketCards169Range(string s, string e) | |
16 | { | |
17 | Hand.PocketHand169Enum smin, smax, emin, emax; | |
18 | - if (s.Length == 3 && s[2] == '*') | |
19 | + if ((s.Length == 2 && s[0] != s[1]) || (s.Length == 3 && s[2] == '*')) | |
20 | { | |
21 | smin = Pocket169(string.Format("{0}{1}s", s[0], s[1])); | |
22 | smax = Pocket169(string.Format("{0}{1}o", s[0], s[1])); | |
23 | @@ -4161,7 +4161,7 @@ namespace HoldemHand | |
24 | smin = smax = Pocket169(s); | |
25 | } | |
26 | ||
27 | - if (e.Length == 3 && e[2] == '*') | |
28 | + if ((e.Length == 2 && e[0] != e[1]) || (e.Length == 3 && e[2] == '*')) | |
29 | { | |
30 | emin = Pocket169(string.Format("{0}{1}s", e[0], e[1])); | |
31 | emax = Pocket169(string.Format("{0}{1}o", e[0], e[1])); | |
32 | - | @@ -4193,17 +4193,21 @@ namespace HoldemHand |
32 | + | @@ -4193,21 +4193,16 @@ namespace HoldemHand |
33 | static public PocketHands PocketCard169Range(Hand.PocketHand169Enum s, Hand.PocketHand169Enum e) | |
34 | { | |
35 | PocketHands retval = new PocketHands(); | |
36 | - int start = (int) s, end = (int) e; | |
37 | - if (start > end) | |
38 | - { | |
39 | - for (int i = end; i <= start; i++) | |
40 | - { | |
41 | - retval |= _Pocket169Combinations[i]; | |
42 | - | if (start > end) |
42 | + | - } |
43 | - } | |
44 | - else | |
45 | - | + for (int i = end; i <= start; i += interval) |
45 | + | |
46 | - | { |
46 | + | |
47 | - | retval |= _Pocket169Combinations[i]; |
47 | + | |
48 | - | } |
48 | + | |
49 | + | |
50 | - | else |
50 | + | + for (int i = start; i <= end; i += interval) |
51 | { | |
52 | - for (int i = start; i <= end; i++) | |
53 | - | + for (int i = start; i <= end; i += interval) |
53 | + | - { |
54 | - | { |
54 | + | - retval |= _Pocket169Combinations[i]; |
55 | - | retval |= _Pocket169Combinations[i]; |
55 | + | - } |
56 | - | } |
56 | + | + retval |= _Pocket169Combinations[i]; |
57 | } | |
58 | + | |
59 | return retval; | |
60 | } |