I checked in draft java JNI support for poker-eval. I wrapped only
the low-level hand eval functions, though it makes sense to
eventually wrap the harder-working enumeration functions. I did not
define any Java classes for Card, Deck, and so on. Instead the eval
methods accept a hand in the form of two int[] arrays, one
indicating the rank of each card and the other the suit. There are
constants for these that match the C definitions. I figure it's
best to stay close to the metal for now.
The reason I did this is that I designed an SAIE (subjective all-in
equity) calculator: when it came time to code it up I realized that
the parsing and input representation would be easier in java than in
C. It's odd how fast the standard java library eclipsed the
standard C library in functionality.
I would be happy to hear comments on the draft implementation.
-Michael M