添加主动获取奇遇事件,奇遇添加答题逻辑

This commit is contained in:
luying
2020-10-15 18:31:36 +08:00
parent 764de8669a
commit 85940779d2
5 changed files with 1102 additions and 27 deletions
+6
View File
@@ -63,6 +63,12 @@ const moment = require('moment');
result = { id: parseInt(id), value: parseInt(value) };
break;
}
case 'position': {
let [x, y] = arr;
if(isNaN(x) || isNaN(y)) throw new Error('格式错误');
result = { x: parseInt(x), y: parseInt(y) };
break;
}
}
return result;
};