diff --git a/SWORD/script.js b/SWORD/script.js index 2e47abc..f6d0eea 100644 --- a/SWORD/script.js +++ b/SWORD/script.js @@ -1 +1 @@ -const a0_0x19b9ba=a0_0x8223;(function(_0x276e1a,_0x5ecc43){const _0x116d63=a0_0x8223,_0x5bb2f1=_0x276e1a();while(!![]){try{const _0x32107f=parseInt(_0x116d63(0x1b5))/0x1*(-parseInt(_0x116d63(0x1bc))/0x2)+parseInt(_0x116d63(0x1c0))/0x3+-parseInt(_0x116d63(0x1db))/0x4+-parseInt(_0x116d63(0x1d1))/0x5+parseInt(_0x116d63(0x1b4))/0x6+parseInt(_0x116d63(0x1e8))/0x7+parseInt(_0x116d63(0x1ed))/0x8*(parseInt(_0x116d63(0x1a7))/0x9);if(_0x32107f===_0x5ecc43)break;else _0x5bb2f1['push'](_0x5bb2f1['shift']());}catch(_0x46f39d){_0x5bb2f1['push'](_0x5bb2f1['shift']());}}}(a0_0x515e,0x359d4));const WORD_LENGTH=0x5,MAX_GUESSES=0x6;let targetWord='',currentGuess=[],guessCount=0x0,gameOver=![];const gameBoard=document[a0_0x19b9ba(0x1c6)]('game-board'),keyboard=document[a0_0x19b9ba(0x1c6)](a0_0x19b9ba(0x1f1)),newGameBtn=document['getElementById']('new-game-btn'),overlay=document[a0_0x19b9ba(0x1c6)]('overlay'),messageBox=document[a0_0x19b9ba(0x1c6)](a0_0x19b9ba(0x1e2)),messageTitle=document['getElementById'](a0_0x19b9ba(0x1af)),messageContent=document[a0_0x19b9ba(0x1c6)](a0_0x19b9ba(0x1a8)),closeMessageBtn=document[a0_0x19b9ba(0x1c6)](a0_0x19b9ba(0x201)),askButton=document[a0_0x19b9ba(0x1dc)]('button');for(let i=0x0;i{const _0xd01d56=a0_0x19b9ba,_0x18fe35=document[_0xd01d56(0x1dc)](_0xd01d56(0x1ac));_0x312d79[_0xd01d56(0x1aa)]('')[_0xd01d56(0x1f3)](_0x117d8a=>{const _0x3d8a90=_0xd01d56,_0x3872da=document['createElement']('button');_0x3872da[_0x3d8a90(0x1d7)]=_0x117d8a,_0x3872da[_0x3d8a90(0x1de)][_0x3d8a90(0x1d3)](_0x3d8a90(0x1b0)),_0x3872da[_0x3d8a90(0x1d0)](_0x3d8a90(0x1f2),()=>handleInput(_0x117d8a)),_0x18fe35[_0x3d8a90(0x1f4)](_0x3872da);}),keyboard[_0xd01d56(0x1f4)](_0x18fe35);});const eraseBtn=document[a0_0x19b9ba(0x1dc)](a0_0x19b9ba(0x1ce));eraseBtn[a0_0x19b9ba(0x1c5)]='',eraseBtn['classList'][a0_0x19b9ba(0x1d3)](a0_0x19b9ba(0x1b0)),eraseBtn[a0_0x19b9ba(0x1d0)](a0_0x19b9ba(0x1f2),handleBackspace);const submitBtn=document[a0_0x19b9ba(0x1dc)]('button');submitBtn[a0_0x19b9ba(0x1c5)]=a0_0x19b9ba(0x1df),submitBtn[a0_0x19b9ba(0x1de)]['add'](a0_0x19b9ba(0x1b0)),submitBtn['addEventListener'](a0_0x19b9ba(0x1f2),handleEnter);const buttonRowContainer=document[a0_0x19b9ba(0x1dc)](a0_0x19b9ba(0x1ac));buttonRowContainer[a0_0x19b9ba(0x1da)]['display']=a0_0x19b9ba(0x1f8),buttonRowContainer['style'][a0_0x19b9ba(0x1d4)]=a0_0x19b9ba(0x1ff),buttonRowContainer[a0_0x19b9ba(0x1f4)](eraseBtn),buttonRowContainer[a0_0x19b9ba(0x1f4)](submitBtn),keyboard[a0_0x19b9ba(0x1f4)](buttonRowContainer);function a0_0x515e(){const _0x3daf90=['You\x20guessed\x20the\x20word\x20in\x20','207FUvrIf','message-content','Enter','split','10px','div','querySelector','pop','message-title','key','getElementsByClassName','Good\x20effort!','length','332736HjdeAl','8QAnNxg','marginTop','Error\x20fetching\x20meaning.\x20Please\x20try\x20again.','onclick','#FCBF47','Great\x20job!','border','47494BfGymM','tile','https://soniachat.vercel.app/api/soniachat.js','backgroundColor','1313115DFiJyo','pointer','\x20Ask\x20Sonia\x20AI\x20the\x20meaning','Amazing!','block','innerHTML','getElementById','.new-game-button','find','https://random-word-api.herokuapp.com/word?length=5','padding','black','New\x20Game','toUpperCase','button','test','addEventListener','410790WpuAuA','ERROR','add','justifyContent','keydown','className','textContent','querySelectorAll','ZXCVBNM','style','1472488umNPIQ','createElement','25px','classList','','removeChild','correct','message-box','\x20tries!','\x20guesses.\x20The\x20word\x20was\x20\x22','color','response-text','display','766752xTRhze','1rem','present','You\x27ve\x20used\x20all\x20','fontSize','89448dkStWL','QWERTYUIOP','0\x200\x2010px\x20#FFD700','none','keyboard','click','forEach','appendChild','stringify','json','You\x20found\x20the\x20word\x20in\x20','flex','contains','POST','Game\x20Over','new-game-button','You\x20did\x20it!','from','center','join','close-message','ask-button','5px'];a0_0x515e=function(){return _0x3daf90;};return a0_0x515e();}async function fetchWord(){const _0x36b8a1=a0_0x19b9ba;try{const _0xe313c4=await fetch(_0x36b8a1(0x1c9)),_0x5f1f9e=await _0xe313c4[_0x36b8a1(0x1f6)]();targetWord=_0x5f1f9e[0x0]['toUpperCase']();}catch(_0x4fe8bc){targetWord=_0x36b8a1(0x1d2);}}function handleEnter(){const _0x2f848b=a0_0x19b9ba;if(!gameOver&¤tGuess[_0x2f848b(0x1b3)]===WORD_LENGTH){const _0x468be4=checkGuess();guessCount0x0&&(currentGuess[_0x438fc6(0x1ae)](),updateBoard());}function updateBoard(){const _0x5b6d52=a0_0x19b9ba,_0x22cb4c=gameBoard[_0x5b6d52(0x1b1)](_0x5b6d52(0x1bd));for(let _0xde85b3=0x0;_0xde85b3_0x1345de[_0x29ba91(0x1d7)]===_0x52a215);_0x52a215===targetWord[_0x2ac856]&&(_0x5209c5[_0x29ba91(0x1de)][_0x29ba91(0x1d3)](_0x29ba91(0x1e1)),_0x5ca3c9[_0x29ba91(0x1de)][_0x29ba91(0x1d3)]('correct'),_0x222e1c++,_0x31d825[_0x52a215]=(_0x31d825[_0x52a215]||0x0)+0x1);}for(let _0x50e2b9=0x0;_0x50e2b9_0x3d7b76[_0x29ba91(0x1d7)]===_0x4c180a);if(targetWord['includes'](_0x4c180a)&&!_0x31d825[_0x4c180a])!_0x503e0b[_0x4c180a]&&(_0x3392ae[_0x29ba91(0x1de)][_0x29ba91(0x1d3)](_0x29ba91(0x1ea)),_0x503e0b[_0x4c180a]=!![],!_0x5f0ac6[_0x29ba91(0x1de)][_0x29ba91(0x1f9)](_0x29ba91(0x1e1))&&_0x5f0ac6['classList'][_0x29ba91(0x1d3)](_0x29ba91(0x1ea)));else!_0x31d825[_0x4c180a]&&(_0x3392ae[_0x29ba91(0x1de)][_0x29ba91(0x1d3)]('absent'),_0x5f0ac6[_0x29ba91(0x1de)]['add']('absent'));}return _0x222e1c===WORD_LENGTH;}function endGame(_0x4a85d1){const _0x3c80bd=a0_0x19b9ba;gameOver=!![],newGameBtn[_0x3c80bd(0x1da)][_0x3c80bd(0x1e7)]=_0x3c80bd(0x1f0);let _0x57b0cb,_0x98b46d;if(_0x4a85d1){if(guessCount===0x1)_0x98b46d=_0x3c80bd(0x1c3),_0x57b0cb='You\x20got\x20it\x20in\x20just\x201\x20try!';else{if(guessCount<=0x3)_0x98b46d=_0x3c80bd(0x1ba),_0x57b0cb=_0x3c80bd(0x1a6)+guessCount+'\x20tries!';else guessCount<=0x5?(_0x98b46d=_0x3c80bd(0x1b2),_0x57b0cb=_0x3c80bd(0x1f7)+guessCount+_0x3c80bd(0x1e3)):(_0x98b46d=_0x3c80bd(0x1fd),_0x57b0cb='It\x20took\x20you\x20'+guessCount+_0x3c80bd(0x1e3));}showMessage(_0x98b46d,_0x57b0cb),audio=new Audio('../audio/level-win.mp3'),audio['play']();}else showMessage(_0x3c80bd(0x1fb),_0x3c80bd(0x1eb)+MAX_GUESSES+_0x3c80bd(0x1e4)+targetWord+'\x22.');const _0x5c64a3=document[_0x3c80bd(0x1dc)](_0x3c80bd(0x1ce));_0x5c64a3[_0x3c80bd(0x1da)][_0x3c80bd(0x1e7)]=_0x3c80bd(0x1c4),_0x5c64a3[_0x3c80bd(0x1da)][_0x3c80bd(0x1b6)]=_0x3c80bd(0x1ab),_0x5c64a3[_0x3c80bd(0x1de)][_0x3c80bd(0x1d3)](_0x3c80bd(0x1a4)),_0x5c64a3[_0x3c80bd(0x1da)]['fontSize']=_0x3c80bd(0x1dd),_0x5c64a3[_0x3c80bd(0x1c5)]=_0x3c80bd(0x1c2);const _0x2c9617='What\x20is\x20the\x20meaning\x20of\x20the\x20word\x20'+targetWord;_0x5c64a3[_0x3c80bd(0x1b8)]=async()=>{const _0x707430=_0x3c80bd;try{const _0x3eb441=await fetch(_0x707430(0x1be),{'method':_0x707430(0x1fa),'headers':{'Content-Type':'application/json'},'body':JSON[_0x707430(0x1f5)]({'message':_0x2c9617})}),_0xbcad14=await _0x3eb441['json'](),_0xdcb96=document[_0x707430(0x1dc)]('p');_0xdcb96[_0x707430(0x1de)][_0x707430(0x1d3)](_0x707430(0x1e6)),_0xdcb96[_0x707430(0x1d7)]=_0xbcad14['text']||'No\x20response\x20available.',messageBox[_0x707430(0x1f4)](_0xdcb96);}catch(_0x559ec9){const _0x46230d=document['createElement']('p');_0x46230d[_0x707430(0x1de)][_0x707430(0x1d3)]('response-text'),_0x46230d[_0x707430(0x1d7)]=_0x707430(0x1b7),messageBox[_0x707430(0x1f4)](_0x46230d);}},messageBox[_0x3c80bd(0x1f4)](_0x5c64a3);}function showMessage(_0x468171,_0x4ece63){const _0x590451=a0_0x19b9ba;messageTitle[_0x590451(0x1d7)]=_0x468171,messageContent[_0x590451(0x1d7)]=_0x4ece63,overlay['style'][_0x590451(0x1e7)]=_0x590451(0x1c4),messageBox[_0x590451(0x1da)][_0x590451(0x1e7)]=_0x590451(0x1c4);const _0xe5531f=messageBox[_0x590451(0x1ad)](_0x590451(0x1c7));_0xe5531f&&messageBox[_0x590451(0x1e0)](_0xe5531f);const _0x2c446d=document[_0x590451(0x1dc)](_0x590451(0x1ce));_0x2c446d[_0x590451(0x1de)]['add'](_0x590451(0x1fc)),_0x2c446d['textContent']=_0x590451(0x1cc),_0x2c446d[_0x590451(0x1da)]['marginTop']=_0x590451(0x1ab),_0x2c446d[_0x590451(0x1da)][_0x590451(0x1ca)]='10px\x2020px',_0x2c446d['style'][_0x590451(0x1ec)]=_0x590451(0x1e9),_0x2c446d['style']['cursor']=_0x590451(0x1c1),_0x2c446d[_0x590451(0x1da)][_0x590451(0x1bf)]=_0x590451(0x1b9),_0x2c446d[_0x590451(0x1da)][_0x590451(0x1e5)]=_0x590451(0x1cb),_0x2c446d[_0x590451(0x1da)][_0x590451(0x1bb)]=_0x590451(0x1f0),_0x2c446d[_0x590451(0x1da)]['borderRadius']=_0x590451(0x1a5),_0x2c446d['style']['boxShadow']=_0x590451(0x1ef),_0x2c446d[_0x590451(0x1d0)](_0x590451(0x1f2),startNewGame),messageBox[_0x590451(0x1f4)](_0x2c446d);}function hideMessage(){const _0x583bb5=a0_0x19b9ba;overlay[_0x583bb5(0x1da)][_0x583bb5(0x1e7)]='none',messageBox[_0x583bb5(0x1da)][_0x583bb5(0x1e7)]=_0x583bb5(0x1f0);}function startNewGame(){const _0x4222aa=a0_0x19b9ba;gameOver=![],currentGuess=[],guessCount=0x0,newGameBtn[_0x4222aa(0x1da)]['display']=_0x4222aa(0x1f0),hideMessage();const _0x29043f=gameBoard[_0x4222aa(0x1b1)](_0x4222aa(0x1bd));Array[_0x4222aa(0x1fe)](_0x29043f)[_0x4222aa(0x1f3)](_0x78c0ba=>{const _0x3ffb03=_0x4222aa;_0x78c0ba['textContent']='',_0x78c0ba[_0x3ffb03(0x1d6)]=_0x3ffb03(0x1bd);});const _0x2e17b2=keyboard[_0x4222aa(0x1b1)](_0x4222aa(0x1b0));Array[_0x4222aa(0x1fe)](_0x2e17b2)[_0x4222aa(0x1f3)](_0x4fd85d=>{const _0x52b025=_0x4222aa;_0x4fd85d[_0x52b025(0x1d6)]=_0x52b025(0x1b0);});const _0x4670a1=messageBox['querySelector']('.ask-button');_0x4670a1&&messageBox[_0x4222aa(0x1e0)](_0x4670a1);const _0x3fc328=messageBox[_0x4222aa(0x1d8)]('.response-text');_0x3fc328[_0x4222aa(0x1f3)](_0x3de2ce=>{const _0x47ae79=_0x4222aa;messageBox[_0x47ae79(0x1e0)](_0x3de2ce);}),fetchWord();}document[a0_0x19b9ba(0x1d0)](a0_0x19b9ba(0x1d5),_0x2ea0c7=>{const _0x26ccd5=a0_0x19b9ba;if(!gameOver){if(_0x2ea0c7[_0x26ccd5(0x1b0)]==='Backspace')handleBackspace();else{if(_0x2ea0c7[_0x26ccd5(0x1b0)]===_0x26ccd5(0x1a9))handleEnter();else/^[A-Za-z]$/[_0x26ccd5(0x1cf)](_0x2ea0c7[_0x26ccd5(0x1b0)])&&handleInput(_0x2ea0c7[_0x26ccd5(0x1b0)][_0x26ccd5(0x1cd)]());}}}),eraseBtn[a0_0x19b9ba(0x1d0)](a0_0x19b9ba(0x1f2),handleBackspace),submitBtn[a0_0x19b9ba(0x1d0)](a0_0x19b9ba(0x1f2),handleEnter),newGameBtn['addEventListener'](a0_0x19b9ba(0x1f2),startNewGame),closeMessageBtn[a0_0x19b9ba(0x1d0)](a0_0x19b9ba(0x1f2),hideMessage),fetchWord(); \ No newline at end of file +const a0_0x328670=a0_0x1676;(function(_0x15309d,_0x3026f7){const _0x245fd7=a0_0x1676,_0x49c27e=_0x15309d();while(!![]){try{const _0x14561b=parseInt(_0x245fd7(0x180))/0x1*(parseInt(_0x245fd7(0x15d))/0x2)+-parseInt(_0x245fd7(0x182))/0x3+-parseInt(_0x245fd7(0x153))/0x4*(-parseInt(_0x245fd7(0x186))/0x5)+parseInt(_0x245fd7(0x14e))/0x6*(parseInt(_0x245fd7(0x141))/0x7)+parseInt(_0x245fd7(0x170))/0x8*(parseInt(_0x245fd7(0x188))/0x9)+-parseInt(_0x245fd7(0x16e))/0xa+-parseInt(_0x245fd7(0x173))/0xb;if(_0x14561b===_0x3026f7)break;else _0x49c27e['push'](_0x49c27e['shift']());}catch(_0x1e9f9b){_0x49c27e['push'](_0x49c27e['shift']());}}}(a0_0x53eb,0x5e166));const WORD_LENGTH=0x5,MAX_GUESSES=0x6;let targetWord='',currentGuess=[],guessCount=0x0,gameOver=![];const gameBoard=document[a0_0x328670(0x167)]('game-board'),keyboard=document['getElementById'](a0_0x328670(0x18f)),newGameBtn=document[a0_0x328670(0x167)](a0_0x328670(0x16c)),overlay=document[a0_0x328670(0x167)](a0_0x328670(0x18a)),messageBox=document[a0_0x328670(0x167)](a0_0x328670(0x195)),messageTitle=document['getElementById'](a0_0x328670(0x150)),messageContent=document[a0_0x328670(0x167)](a0_0x328670(0x176)),closeMessageBtn=document[a0_0x328670(0x167)]('close-message'),askButton=document[a0_0x328670(0x164)](a0_0x328670(0x196));function vibrateKey(){const _0x543480=a0_0x328670;navigator[_0x543480(0x189)]&&navigator[_0x543480(0x189)](0x19);}function a0_0x53eb(){const _0x3c357b=['toUpperCase','1007410wZTjvl','5px','615016iwJNOm','No\x20response\x20available.','ERROR','546942noouej','1rem','borderRadius','message-content','cursor','length','style','play','addEventListener','border','New\x20Game','It\x20took\x20you\x20','Great\x20job!','324487fzAyWH','test','1965864yLDyBJ','Good\x20effort!','from','flex','2342680fcHhMF','keydown','18DoHiBs','vibrate','overlay','textContent','push','10px','Error\x20fetching\x20meaning.\x20Please\x20try\x20again.','keyboard','tile','.ask-button','innerHTML','https://random-word-api.herokuapp.com/word?length=5','../audio/level-win.mp3','message-box','button','stringify','div','\x20Ask\x20Sonia\x20AI\x20the\x20meaning','text','.response-text','onclick','querySelectorAll','Backspace','ASDFGHJKL','Enter','pop','10px\x2020px','click','fontSize','forEach','You\x20guessed\x20the\x20word\x20in\x20','none','join','81452fTyTyt','\x20tries!','You\x20got\x20it\x20in\x20just\x201\x20try!','justifyContent','json','application/json','getElementsByClassName','appendChild','find','marginTop','#FCBF47','className','add','126qLeuiQ','pointer','message-title','25px','new-game-button','4czSVyy','\x20guesses.\x20The\x20word\x20was\x20\x22','You\x20found\x20the\x20word\x20in\x20','What\x20is\x20the\x20meaning\x20of\x20the\x20word\x20','classList','response-text','block','QWERTYUIOP','present','display','2IuAjeu','Game\x20Over','color','backgroundColor','You\x27ve\x20used\x20all\x20','You\x20did\x20it!','correct','createElement','absent','boxShadow','getElementById','querySelector','key','padding','https://soniachat.vercel.app/api/soniachat.js','new-game-btn'];a0_0x53eb=function(){return _0x3c357b;};return a0_0x53eb();}for(let i=0x0;i{const _0x22c396=a0_0x328670,_0x3febb6=document[_0x22c396(0x164)](_0x22c396(0x198));_0x45f1ec['split']('')[_0x22c396(0x1a5)](_0x1b6586=>{const _0x23d9e2=_0x22c396,_0x139d84=document[_0x23d9e2(0x164)](_0x23d9e2(0x196));_0x139d84[_0x23d9e2(0x18b)]=_0x1b6586,_0x139d84[_0x23d9e2(0x157)]['add'](_0x23d9e2(0x169)),_0x139d84[_0x23d9e2(0x17b)](_0x23d9e2(0x1a3),()=>handleInput(_0x1b6586)),_0x3febb6[_0x23d9e2(0x148)](_0x139d84);}),keyboard[_0x22c396(0x148)](_0x3febb6);});const eraseBtn=document[a0_0x328670(0x164)](a0_0x328670(0x196));eraseBtn[a0_0x328670(0x192)]='',eraseBtn[a0_0x328670(0x157)][a0_0x328670(0x14d)](a0_0x328670(0x169)),eraseBtn[a0_0x328670(0x17b)]('click',handleBackspace);const submitBtn=document[a0_0x328670(0x164)]('button');submitBtn[a0_0x328670(0x192)]='',submitBtn[a0_0x328670(0x157)][a0_0x328670(0x14d)](a0_0x328670(0x169)),submitBtn[a0_0x328670(0x17b)](a0_0x328670(0x1a3),handleEnter);const buttonRowContainer=document[a0_0x328670(0x164)](a0_0x328670(0x198));function a0_0x1676(_0x4340f1,_0x322c6e){const _0x53eb55=a0_0x53eb();return a0_0x1676=function(_0x16766e,_0x1c7ccf){_0x16766e=_0x16766e-0x13e;let _0x1e2656=_0x53eb55[_0x16766e];return _0x1e2656;},a0_0x1676(_0x4340f1,_0x322c6e);}buttonRowContainer[a0_0x328670(0x179)]['display']=a0_0x328670(0x185),buttonRowContainer[a0_0x328670(0x179)][a0_0x328670(0x144)]='center',buttonRowContainer[a0_0x328670(0x148)](eraseBtn),buttonRowContainer[a0_0x328670(0x148)](submitBtn),keyboard['appendChild'](buttonRowContainer);async function fetchWord(){const _0x359582=a0_0x328670;try{const _0xa8876c=await fetch(_0x359582(0x193)),_0x9736ce=await _0xa8876c[_0x359582(0x145)]();targetWord=_0x9736ce[0x0][_0x359582(0x16d)]();}catch(_0x79f862){targetWord=_0x359582(0x172);}}function handleEnter(){if(!gameOver&¤tGuess['length']===WORD_LENGTH){vibrateKey();const _0x3c8fd1=checkGuess();guessCount0x0&&(vibrateKey(),currentGuess[_0x4c8952(0x1a1)](),updateBoard());}function updateBoard(){const _0x3f76c1=a0_0x328670,_0x41d3bf=gameBoard[_0x3f76c1(0x147)]('tile');for(let _0x440f58=0x0;_0x440f58_0x1130a0[_0x45b27b(0x18b)]===_0x548dac);_0x548dac===targetWord[_0x2c3392]&&(_0x3c75cb[_0x45b27b(0x157)]['add'](_0x45b27b(0x163)),_0x2ccfcc[_0x45b27b(0x157)]['add'](_0x45b27b(0x163)),_0x174e6d++,_0x1d42c3[_0x548dac]=(_0x1d42c3[_0x548dac]||0x0)+0x1);}for(let _0x41363=0x0;_0x41363_0x477057[_0x45b27b(0x18b)]===_0x85a3ce);if(targetWord['includes'](_0x85a3ce)&&!_0x1d42c3[_0x85a3ce])!_0x378c67[_0x85a3ce]&&(_0x387842[_0x45b27b(0x157)][_0x45b27b(0x14d)](_0x45b27b(0x15b)),_0x378c67[_0x85a3ce]=!![],!_0x34be76[_0x45b27b(0x157)]['contains']('correct')&&_0x34be76['classList'][_0x45b27b(0x14d)](_0x45b27b(0x15b)));else!_0x1d42c3[_0x85a3ce]&&(_0x387842[_0x45b27b(0x157)][_0x45b27b(0x14d)](_0x45b27b(0x165)),_0x34be76['classList']['add'](_0x45b27b(0x165)));}return _0x174e6d===WORD_LENGTH;}function endGame(_0x36b5a8){const _0x2d1bf2=a0_0x328670;gameOver=!![],newGameBtn[_0x2d1bf2(0x179)]['display']=_0x2d1bf2(0x13f);let _0x2bdee3,_0x548421;if(_0x36b5a8){if(guessCount===0x1)_0x548421='Amazing!',_0x2bdee3=_0x2d1bf2(0x143);else{if(guessCount<=0x3)_0x548421=_0x2d1bf2(0x17f),_0x2bdee3=_0x2d1bf2(0x13e)+guessCount+'\x20tries!';else guessCount<=0x5?(_0x548421=_0x2d1bf2(0x183),_0x2bdee3=_0x2d1bf2(0x155)+guessCount+'\x20tries!'):(_0x548421=_0x2d1bf2(0x162),_0x2bdee3=_0x2d1bf2(0x17e)+guessCount+_0x2d1bf2(0x142));}showMessage(_0x548421,_0x2bdee3),audio=new Audio(_0x2d1bf2(0x194)),audio[_0x2d1bf2(0x17a)]();}else showMessage(_0x2d1bf2(0x15e),_0x2d1bf2(0x161)+MAX_GUESSES+_0x2d1bf2(0x154)+targetWord+'\x22.');const _0x41cef6=document[_0x2d1bf2(0x164)](_0x2d1bf2(0x196));_0x41cef6[_0x2d1bf2(0x179)][_0x2d1bf2(0x15c)]=_0x2d1bf2(0x159),_0x41cef6[_0x2d1bf2(0x179)][_0x2d1bf2(0x14a)]=_0x2d1bf2(0x18d),_0x41cef6['classList'][_0x2d1bf2(0x14d)]('ask-button'),_0x41cef6['style'][_0x2d1bf2(0x1a4)]=_0x2d1bf2(0x151),_0x41cef6[_0x2d1bf2(0x192)]=_0x2d1bf2(0x199);const _0x1e6f6e=_0x2d1bf2(0x156)+targetWord;_0x41cef6[_0x2d1bf2(0x19c)]=async()=>{const _0xeff608=_0x2d1bf2;try{const _0xc091a9=await fetch(_0xeff608(0x16b),{'method':'POST','headers':{'Content-Type':_0xeff608(0x146)},'body':JSON[_0xeff608(0x197)]({'message':_0x1e6f6e})}),_0x30c6d9=await _0xc091a9[_0xeff608(0x145)](),_0x4e692f=document[_0xeff608(0x164)]('p');_0x4e692f['classList']['add'](_0xeff608(0x158)),_0x4e692f[_0xeff608(0x18b)]=_0x30c6d9[_0xeff608(0x19a)]||_0xeff608(0x171),messageBox[_0xeff608(0x148)](_0x4e692f);}catch(_0x3b2568){const _0x160b35=document['createElement']('p');_0x160b35['classList']['add'](_0xeff608(0x158)),_0x160b35['textContent']=_0xeff608(0x18e),messageBox[_0xeff608(0x148)](_0x160b35);}},messageBox['appendChild'](_0x41cef6);}function showMessage(_0x421c08,_0x5b4393){const _0x9a847f=a0_0x328670;messageTitle[_0x9a847f(0x18b)]=_0x421c08,messageContent[_0x9a847f(0x18b)]=_0x5b4393,overlay[_0x9a847f(0x179)]['display']='block',messageBox[_0x9a847f(0x179)][_0x9a847f(0x15c)]='block';const _0x2cd9e2=messageBox[_0x9a847f(0x168)]('.new-game-button');_0x2cd9e2&&messageBox['removeChild'](_0x2cd9e2);const _0x550c57=document[_0x9a847f(0x164)](_0x9a847f(0x196));_0x550c57['classList'][_0x9a847f(0x14d)](_0x9a847f(0x152)),_0x550c57[_0x9a847f(0x18b)]=_0x9a847f(0x17d),_0x550c57['style'][_0x9a847f(0x14a)]='10px',_0x550c57[_0x9a847f(0x179)][_0x9a847f(0x16a)]=_0x9a847f(0x1a2),_0x550c57['style'][_0x9a847f(0x1a4)]=_0x9a847f(0x174),_0x550c57['style'][_0x9a847f(0x177)]=_0x9a847f(0x14f),_0x550c57[_0x9a847f(0x179)][_0x9a847f(0x160)]=_0x9a847f(0x14b),_0x550c57[_0x9a847f(0x179)][_0x9a847f(0x15f)]='black',_0x550c57[_0x9a847f(0x179)][_0x9a847f(0x17c)]=_0x9a847f(0x13f),_0x550c57[_0x9a847f(0x179)][_0x9a847f(0x175)]=_0x9a847f(0x16f),_0x550c57[_0x9a847f(0x179)][_0x9a847f(0x166)]='0\x200\x2010px\x20#FFD700',_0x550c57['addEventListener']('click',startNewGame),messageBox[_0x9a847f(0x148)](_0x550c57);}function hideMessage(){const _0x10715b=a0_0x328670;overlay[_0x10715b(0x179)]['display']=_0x10715b(0x13f),messageBox[_0x10715b(0x179)][_0x10715b(0x15c)]='none';}function startNewGame(){const _0x334562=a0_0x328670;gameOver=![],currentGuess=[],guessCount=0x0,newGameBtn[_0x334562(0x179)][_0x334562(0x15c)]=_0x334562(0x13f),hideMessage();const _0x7295b3=gameBoard[_0x334562(0x147)](_0x334562(0x190));Array[_0x334562(0x184)](_0x7295b3)['forEach'](_0x5f12ac=>{const _0x24d2e7=_0x334562;_0x5f12ac[_0x24d2e7(0x18b)]='',_0x5f12ac[_0x24d2e7(0x14c)]=_0x24d2e7(0x190);});const _0x2ac83b=keyboard[_0x334562(0x147)](_0x334562(0x169));Array[_0x334562(0x184)](_0x2ac83b)['forEach'](_0x2600c1=>{const _0x56c2cd=_0x334562;_0x2600c1[_0x56c2cd(0x14c)]=_0x56c2cd(0x169);});const _0x43b276=messageBox['querySelector'](_0x334562(0x191));_0x43b276&&messageBox['removeChild'](_0x43b276);const _0x5dce2b=messageBox[_0x334562(0x19d)](_0x334562(0x19b));_0x5dce2b['forEach'](_0x5e1b2d=>{messageBox['removeChild'](_0x5e1b2d);}),fetchWord();}document[a0_0x328670(0x17b)](a0_0x328670(0x187),_0x46d211=>{const _0x52c3ca=a0_0x328670;if(!gameOver){if(_0x46d211[_0x52c3ca(0x169)]===_0x52c3ca(0x19e))handleBackspace();else{if(_0x46d211[_0x52c3ca(0x169)]===_0x52c3ca(0x1a0))handleEnter();else/^[A-Za-z]$/[_0x52c3ca(0x181)](_0x46d211[_0x52c3ca(0x169)])&&handleInput(_0x46d211['key'][_0x52c3ca(0x16d)]());}}}),eraseBtn['addEventListener'](a0_0x328670(0x1a3),handleBackspace),submitBtn[a0_0x328670(0x17b)](a0_0x328670(0x1a3),handleEnter),newGameBtn[a0_0x328670(0x17b)](a0_0x328670(0x1a3),startNewGame),closeMessageBtn[a0_0x328670(0x17b)](a0_0x328670(0x1a3),hideMessage),fetchWord(); \ No newline at end of file