Organize este código: async function joguinhodavelha() { if…
- User
Organize este código:
async function joguinhodavelha() { if (joguinhodavelhajs2.includes(from) || joguinhodavelhajs.includes(sender)) { const cmde = budy.toLowerCase().split(" ")[0] || ""; let arrNum = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
if (fs.existsSync(`./armor/tictactoe/db/${from}.json`)) { const boardnow = setGame(`${from}`); if (budy == "Cex") return reply("Por quê?"); if (["s", "sim", "ok"].includes(budy.toLowerCase())) { if (boardnow.O == sender.replace("@s.whatsapp.net", "")) { if (boardnow.status) return reply(`O jogo já começou antes!`); const matrix = boardnow._matrix; boardnow.status = true; fs.writeFileSync(`./armor/tictactoe/db/${from}.json`, JSON.stringify(boardnow, null, 2)); const chatAccept = `*🎮 Jogo da Velha 🕹️*❌ : @{boardnow.O}
Sua vez: @${boardnow.turn == "X" ? boardnow.X : boardnow.O}
{matrix[0][1]} {matrix[1][0]} {matrix[1][2]} {matrix[2][1]} {from}.json@${boardnow.X} `); joguinhodavelhajs.splice([]); fs.writeFileSync('./datab/usuarios/joguinhodavelha.json', JSON.stringify(joguinhodavelhajs)); joguinhodavelhajs2.splice([]); fs.writeFileSync('./datab/usuarios/joguinhodavelha2.json', JSON.stringify(joguinhodavelhajs2)); } } }
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.