await (async function letUsGo(){
let uid = '';
let authorization = '';
let gameid = '';
let commandStep = 0;
let commandArr = [
[{"times":2,"command":["2","L","D","L","4","D","6","R","D","R"]}],
[{"times":2,"command":["2","R","D","R","6","D","4","L","D","L"]}],
[{"times":10,"command":[{"times":2,"command":["D","2","L","D","L","4","D","6","U","L","D","R"]},"L","D"]},{"times":2,"command":["U","U","8","R"]},{"times":10,"command":[{"times":2,"command":["D","2","R","D","R","6","D","4","U","R","D","L"]},"R","D"]},{"times":2,"command":["U","U","8","L"]}],
[{"times":10,"command":[{"times":2,"command":["D","2","L","D","L","4","D","6","U","L","D","R"]},"L","D"]},{"times":2,"command":["U","U","8","R"]},{"times":10,"command":[{"times":2,"command":["D","2","R","D","R","6","D","4","U","R","D","L"]},"R","D"]},{"times":2,"command":["U","U","8","L"]}],
[{"times":10,"command":["L","L","L","4","L","L","L","4","D","R","R","R","6","R","R","R","6"]},{"times":3,"command":["U","U","L","L","8","4"]},{"times":6,"command":["D","2","L","D","L","4","D","6","U","L","D","R"]},"L","D",{"times":10,"command":["R","R","R","6","R","R","R","6","D","L","L","L","4","L","L","L","4"]},{"times":3,"command":["U","U","R","R","8","6"]},{"times":6,"command":["D","2","R","D","R","6","D","4","U","R","D","L"]},"R","D"]
];
let coreCode = commandArr[commandStep];
let loop = commandStep <= 1 ? 2 : 4;
let params = {"command": []};
let linshiyinyong = params;
for (let i = 0;i<loop;i++){
linshiyinyong['command'].push({"times": 10, "command": []});
linshiyinyong = linshiyinyong.command[0];
if (i >= loop-1) {
linshiyinyong.command.push(...coreCode);
}
}
linshiyinyong = null;
let datarus = await fetch('https://juejin-game.bytedance.com/game/sea-gold/game/command?uid=' + uid + '&time=' + Date.parse(new Date()), {
method: 'POST',
credentials: "include",
headers: {
'Content-type': 'application/json; charset=UTF-8',
'authorization': authorization,
'accept': 'application/json, text/plain, */*',
'content-length': JSON.stringify(params).length,
'x-tt-gameid': gameid,
},
body: JSON.stringify(params)
}).then(async (res) => {
return res.json();
});
return datarus;
})();