iRusher / texas_poker_evaluator

2 stars 3 forks source link

卧槽围观大神 #1

Open walking-with-linght opened 1 year ago

walking-with-linght commented 1 year ago

接口有注释就好了

walking-with-linght commented 1 year ago

https://github.com/iRusher/texas_poker_evaluator/blob/295943bb5e3d2a9edb432924481cc6eb7c83ccca/poker.lua#L660 h1v 和h2v是空值, 另外,打开 TEST for lookup 下面的测试代码也会报错

walking-with-linght commented 1 year ago

解决了,前提是lookup也要初始化,另外,https://github.com/iRusher/texas_poker_evaluator/blob/295943bb5e3d2a9edb432924481cc6eb7c83ccca/poker.lua#L360 这里应该改成 lookup.temp_flush = {} 不然会报错。

walking-with-linght commented 1 year ago

函数evaluater.multi中 if rank < max_rank then 应当修改为 if rank <= max_rank then,否则 max_cards可能为空

iRusher commented 1 year ago

哈哈哈,怎么翻出来的。

walking-with-linght commented 1 year ago

lua-德扑的算法太少了,就你这套算法最实用

iRusher commented 1 year ago

上线之前还改过一些,但是没有同步到这儿来,现在代码也找不到了。有兴趣的话可以发个PR