Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
打印 challenges,以便对应索引
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuweiyou committed Mar 8, 2018
1 parent a58026a commit ae793d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 我最在行/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mongoimport -d wzzh -c questions --file ~/Downloads/questions.json --jsonArray -

复制返回的 `access_token``account_id`,填入 [src/robot.js](src/robot.js)

再修改其中的 `theme` 为你要答题的分类索引,比如 0 为全能王
再修改其中的 `theme` 为你要答题的分类索引

执行 `npm run robot` 开始智能答题,答题过程是全自动的

Expand Down
1 change: 1 addition & 0 deletions 我最在行/src/common/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ async function game ({player, master = false, match = false, theme = 0} = {}) {
const accountsSelf = await https.accountsSelf()
// 获取题库分类
const challenges = await https.challenges()
console.log('[challenges]', challenges)
// 获取某个分类下的信息
const {theme_id} = challenges[theme]
const danGrade = (await https.selfDanGrades({theme_id}))[0] || {}
Expand Down
2 changes: 1 addition & 1 deletion 我最在行/src/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ match({
// 抓登录请求返回的 access_token 和 account_id
access_token: '',
account_id: '',
// 分类索引。比如 0 为全能王
// 分类索引。(关注打印的 `[challenges]` 数组,索引对应它)
theme: 0
})

0 comments on commit ae793d5

Please sign in to comment.