First functional parity with poker.c