Comments (11)
Will be fixed. Thanks! Create pull request next time.
from texasholdemgameengine.
this way not the highest possible straight is returned but the lowest instead - will fix it
from texasholdemgameengine.
Add unit tests (for regression)
from texasholdemgameengine.
!!! line 134 - var straightCards = cards.Select(x => (int)x.Type).ToList(); - returns duplicates
renaming proposal: CompareTwoHandsWithHighCard => CompareKickers/CompareSideCards
Comparing straights - comparing any card[1-3] is enough - no Ace possible there -
bigger wins - no matter which way sorted - think will be faster O(1)
from texasholdemgameengine.
Open new issues for every single bug.
from texasholdemgameengine.
When comparing straights there are objects of type CardType
so Ace
is expected.
from texasholdemgameengine.
Mean if compare e.g. 2nd cards only - no Ace
possible there - Ace
may be first or last only
from texasholdemgameengine.
What about this case:
new[]
{
CardType.Six, CardType.Five,
CardType.Four, CardType.Three,
CardType.Two
},
new[]
{
CardType.Five, CardType.Four,
CardType.Three, CardType.Two,
CardType.Ace
}
from texasholdemgameengine.
e.g.
2nd cards: five > four => first wins
3rd cards: four > three => first wins
4th cards.......
Ace
s can be in the beginning or the end of hand - not in the middle - don't check ends - any middle card will do the trick
Not wrong now, of course, but may be less complex
from texasholdemgameengine.
I've got the idea but the current solution is O(n)
and the one you suggest requires sorting which will be O(n * log(n)
.
from texasholdemgameengine.
thought they come sorted from hand evaluator, from tests come shuffled - anyway U know better 👍
from texasholdemgameengine.
Related Issues (15)
- 100% test coverage
- Some projects in the solution are not loading correctly HOT 1
- Implement showdown
- Increase hands per level (blinds raise)
- Create NuGet package
- Full house issue HOT 1
- Implement minimum bet and raise amount HOT 2
- Full house evaluation
- StraightFlush optimization proposal
- question
- Proposal on comparing equal hands by rank type
- There is no document for how to use
- Comparing kickers HOT 1
- Proposal on speeding hand checks a bit more
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from texasholdemgameengine.