MrKWatkins
  • Home
  • Algorithms
  • C#
  • Oakley
  • Poker
  • Rendering
  • Rust
Subscribe
Tagged

Poker

A collection of 4 posts

Poker

Evaluating Poker Hands

Using our set of cards and our bit representations we can now evaluate poker hands using excessive bit twiddling. The general approach is to shuffle the bits for each suit around and combine them with various logical operations to work out what hand we have. We will work with bit

  • Kevin Watkins
Kevin Watkins Jun 18, 2022 • 5 min read
Poker

More Bit Representations

Card Bit Mask We already have one representation of cards using bit indices but there is another representation we could use that would be easier to work with when evaluating poker hands. A long can be split into 4 × 16 bit sections, each of which can represent a suit. 16

  • Kevin Watkins
Kevin Watkins Mar 5, 2022 • 5 min read
Poker

Card Combinations

Before we can start evaluating five card poker hands we actually need to get some five card poker hands. So we need some code to produce five card hand combinations from a full deck of cards. Combinations can be built recursively. Start with an empty combination and add cards from

  • Kevin Watkins
Kevin Watkins Feb 19, 2022 • 4 min read
Poker

A Set of Cards

Many years ago I worked at a company that used a C library for evaluating poker hands. Never really understood how it worked; it used a lot of hard to read bit twiddling. A few years back I decided to see if I could come up with something similar in

  • Kevin Watkins
Kevin Watkins Jan 23, 2022 • 3 min read
MrKWatkins © 2022
Powered by Ghost