yfzm / poker-bot Goto Github PK
View Code? Open in Web Editor NEWA slack app for playing Texas Hold'em
License: MIT License
A slack app for playing Texas Hold'em
License: MIT License
保存用户筹码等数据
判断是否能够check的依据应该为:
当前玩家的下注是否不少于其他所有玩家的下注
允许使用指令创建bot
添加manage层逻辑,保存与游戏逻辑无关内容,并维护其他状态。
table逻辑规约如下:
manager.py
中管理,libs/game.py
只负责单局游戏game.get_round_status_name()
获取timer_function
会被调用,进入无限循环,且每隔一秒会调用mainloop
函数mainloop
被调用会通过game读取当前游戏的状态,如果状态与table中保留的状态相比发生了变化(等待行动的id变化或游戏轮次改变),则将倒计时复位,否则倒计时-1check_or_fold
(暂未实现,使用pfold
代替)mainloop
中获取游戏状态为END
的时候,结束游戏,输出结算信息,等待N秒后,调用game.start()继续下一局(暂时实现为结束运行)用户join到牌桌时,自动登录,并提示用户剩余筹码
弃牌玩家不需要展示手牌,目前在判断是否要展示时出错
复现方法:
open
bot
bot
start
fold
认为一个channel中最多只有一个table,将channel与table当做一个实体。
消除代码中关于channel和table的转换。
目标让game类只处理一局游戏,内部只是一个自动状态机,接受外部请求并处理。
添加help功能,显示目前所有可用操作。
游戏开始时提示“可输入help获取帮助”。
poker_cmp目前无法通过单元测试,需要修复。
两人单挑时,小盲位应和庄位重合。ref
In heads-up play with two blinds, the small blind is on the button.
目前的实现是:每当进入一个新的状态,重新输出当前游戏状态,只有在读秒时触发更新操作。理想的实现应该是总是只有一个输出消息被固定在屏幕上。然而这一点难以实现,可以等效为删除之前展示的旧数据,然后发布新数据。
例如:
等等。。。
用户可以通过点击按钮来触发跟注/弃牌等动作
start
在执行时没有进行游戏状态检查,随时可能导致程序崩溃
可以考虑精简timer_thread
的逻辑、优化continue
与start
的关系
调整格式,使得现在可以通过flake8检测。
规约如下:
game_result
)置为游戏结果
支持并发操作,有两种方案:
由 #85 引入的bug
移除时钟逻辑,抽离到管理层
为kernel添加测试。
复现方法:
open
bot
bot
leave
start
预期效果:
两个bot完成一局游戏
把bots/game的调用从table.py中移除。
规则如下:
支持多种client连接,例如qq,自定义client等。
可以将client设计成插件或其他模式来完成。
响应用户的以下操作:
目标为:
如题
复现方法
open
bot
bot
start
fold
close:关闭一个牌桌
reopen:重开本牌桌
游戏内所有操作没有通知bot。
设想:
用户在join时可以指定用户名
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.