PageSourceSearch

https://eloquent-sprinkles-61e90b.netlify.app/_nuxt/game.30fccb89.js

js eloquent-sprinkles-61e90b.netlify.app collected 2026-10-03 10:41:45 UTC 3,154 bytes, 1 lines download raw bytes

1import{r as v,q as I,c as s,a as f,d as T,t as m,u as i,A as C,F as y,B as w,o as c,b as L,z as V}from"./entry.dbcbb0fb.js";const W={class:"min-h-screen bg-white flex flex-col items-center justify-center pt-16"},Y={class:"text-3xl md:text-5xl mb-4 text-gray-700 font-mono pt-2"},G={key:0},$={class:"bg-white border-2 border-green-500 my-auto",style:{margin:"-2px"}},z=["onClick"],F={class:"mt-4 h-11 w-40 bg-green-500 p-1 rounded-3xl hover:scale-110"},A={__name:"game",setup(J){const t=v([["","",""],["","",""],["","",""]]),a=v(""),l=v(""),n=v(!1);I(()=>{g()});const g=()=>{a.value=Math.random()<.5?"twemoji:frog":"vscode-icons:file-type-lilypond",l.value="",n.value=!1,k(),a.value==="vscode-icons:file-type-lilypond"&&setTimeout(()=>{h(),a.value="twemoji:frog"},500)},j=()=>{g()},k=()=>{for(let e=0;e<3;e++)for(let o=0;o<3;o++)t.value[e][o]=""},M=(e,o)=>{if(!n.value&&t.value[e][o]===""&&l.value===""&&a.value==="twemoji:frog"){if(t.value[e][o]=a.value,_(),!t.value.flat().includes("")&&l.value===""){l.value="It's a tie!",n.value=!0;return}n.value||setTimeout(()=>{h(),a.value="twemoji:frog"},500)}},h=()=>{let e=[];for(let o=0;o<3;o++)for(let r=0;r<3;r++)t.value[o][r]===""&&e.push({row:o,col:r});if(e.length>0){const o=N(e),{row:r,col:d}=o||O(e);t.value[r][d]="vscode-icons:file-type-lilypond",_()}},N=e=>{for(const o of e){const r=JSON.parse(JSON.stringify(t.value));if(r[o.row][o.col]=a.value,b(r,a.value)||b(r,S()))return o}return null},O=e=>{const o=Math.floor(Math.random()*e.length);return e[o]},S=()=>a.value==="twemoji:frog"?"vscode-icons:file-type-lilypond":"twemoji:frog",_=()=>{for(let e=0;e<3;e++)if(u([t.value[e][0],t.value[e][1],t.value[e][2]])||u([t.value[0][e],t.value[1][e],t.value[2][e]])){l.value=`${t.value[e][0]} wins!`,n.value=!0,t.value[e][0]==="twemoji:frog"?l.value="Ribbit Ribbit! You WIN!":l.value="Opps... You LOST!";return}if(u([t.value[0][0],t.value[1][1],t.value[2][2]])||u([t.value[0][2],t.value[1][1],t.value[2][0]])){l.value=`${t.value[0][0]} wins!`,n.value=!0,t.value[0][0]==="twemoji:frog"?l.value="Ribbit Ribbit! You WIN!":l.value="Opps... You LOST!";return}if(!t.value.flat().includes("")&&l.value===""){l.value="It's a tie!",n.value=!0;return}},u=e=>e[0]!==""&&e[0]===e[1]&&e[1]===e[2],b=(e,o)=>{for(let r=0;r<3;r++)if(u([e[r][0],e[r][1],e[r][2]])||u([e[0][r],e[1][r],e[2][r]]))return!0;return!!(u([e[0][0],e[1][1],e[2][2]])||u([e[0][2],e[1][1],e[2][0]]))};return(e,o)=>{const r=V;return c(),s("div",W,[f("h1",Y,[T(m(i(l))+" ",1),i(l)===""&&i(a)!==""?(c(),s("div",G," It's "+m(i(a)==="twemoji:frog"?"your":"computer")+" turn ",1)):C("",!0)]),f("div",$,[(c(!0),s(y,null,w(i(t),(d,p)=>(c(),s("div",{key:p,class:"flex flex-row"},[(c(!0),s(y,null,w(d,(R,x)=>(c(),s("div",{key:x,onClick:P=>M(p,x),class:"h-22 w-22 md:h-40 md:w-40 flex items-center justify-center border-2 border-green-500 cursor-pointer"},[L(r,{name:R,size:"100",class:"p-2 md:p-0"},null,8,["name"])],8,z))),128))]))),128))]),f("div",F,[f("button",{onClick:j,class:"bg-green-500 text-white h-full w-full rounded-3xl text-bold text-xl border border-white hover:text-2xl hover:border-2"},m(i(l)?"Restart":"Start Game"),1)])])}}};export{A as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.