bullshitking's People
bullshitking's Issues
倒计时移动到backend
后端状态/前端缓存
- 在前端缓存用户信息
localStorage
- 用户刷新/重新打开页面后 读取并自动登陆
- 游戏状态(等待/进行/结束/倒计时)由后端发送
回车发送文本
连接延迟
浏览器断开连接后,服务器需要20~30秒的时间才能处理这个断开。这和用localhost测试的时候区别很大,之前都是秒断开的。
差不多类似的问题。
https://stackoverflow.com/questions/39471366/socket-io-js-delay-disconnect-emit
miguelgrinberg/Flask-SocketIO#114
之后处理
确定按钮的激活状态
三个按钮:
开始/结束/计时
开始前:✔❌❌
开始后:❌✔✔
倒计时:❌✔❌
结束一:❌✔❌
结束二:✔❌❌ = 开始前
状态机
跳过卡片
需要一个跳过卡片的功能
目前是 强制重置房间,但是会需要重新输入用户名,很麻烦。
跳过卡片 =
清空所有倒计时器,
游戏状态改为end (发送end信号)
重新向后端发送start信号。
(那么在发送end信号的时候就应该清空倒计时器。)←需要先写。
轮流当Smart
在backend增加轮流当smart的功能,而不是直接随机选择,保证至少没人一次smart。
用字典记录每个玩家当smart的次数,
在在线人数=0的时候清空,
如果每个玩家的次数一样,则随机选择,
不然随机选择一个次数最少的玩家。
- 如果有新加入的玩家导致次数一直是最少的,则ta不能连续做smart。
添加倒计时提示
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.