Fix bugs for poker engine + add tests to control correct behavior