https://xxyh.xiaoli.icu/api/p_game_guess.phphttps://xxyh.xiaoli.icu/api/p_game_guess.php?action=open&min=1&max=100&maxTries=0区间内猜数字,每次提示大了还是小了。本站自研实现,零外部依赖。用 action 参数区分开一局(open)、走一步(act)、查状态(state)、删除(close)。骰子与抽卡是无状态工具,直接传参即出结果,不需要 gameId。对局状态保存在服务端 30 分钟(大型游戏 2 小时),超时自动回收。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
action |
string | 选填 | open | open开一局/act走一步/state查状态/close删除,默认open |
gameId |
string | 选填 | — | act/state/close 时必填,开局返回 |
min |
int | 选填 | 1 | 最小值,默认1 |
max |
int | 选填 | 100 | 最大值,默认100 |
maxTries |
int | 选填 | 0 | 机会次数,0自动 |
guess |
int | 选填 | — | act时猜的数字 |
https://xxyh.xiaoli.icu/api/p_game_guess.php
此处将显示接口返回结果…
{
"code": 200, "msg": "ok",
"data": {
"gameId": "g_abcd1234ef", "game": "guess", "gameName": "猜数字",
"state": { "range": {"min":1,"max":100}, "tries":0, "status":"playing" },
"finished": false, "moves": 0, "ttlSeconds": 1800
}
}
—