-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2484.9b316632.chunk.js
More file actions
1 lines (1 loc) · 9.83 KB
/
2484.9b316632.chunk.js
File metadata and controls
1 lines (1 loc) · 9.83 KB
1
"use strict";(self.webpackChunkfezcodex=self.webpackChunkfezcodex||[]).push([[2484],{9808(e,t,a){a.d(t,{A:()=>r});var s=a(9950);const r=new Map([["bold",s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",s.createElement(s.Fragment,null,s.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),s.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",s.createElement(s.Fragment,null,s.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]])},82484(e,t,a){a.r(t),a.d(t,{default:()=>j});var s=a(9950),r=a(18905),n=a(53291),l=a(34272),i=a(4422),c=a(48390),o=a(85528),d=a(48460),m=a(85921),x=a(39886),p=a(44374),h=a(89837),g=a(35951),u=a(44414);function f(e){const t=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];for(let a=0;a<t.length;a++){const[s,r,n]=t[a];if(e[s]&&e[s]===e[r]&&e[s]===e[n])return e[s]}return null}const j=()=>{const e="Tic Tac Toe",[t,a]=(0,s.useState)(Array(9).fill(null)),[j,b]=(0,s.useState)(!0),[w,y]=(0,s.useState)(null),{addToast:v}=(0,p.d)(),N=(0,s.useCallback)(e=>{if(w||t[e])return;const s=t.slice();s[e]=j?"X":"O",a(s),b(!j)},[t,w,j]),A=(0,s.useCallback)((e,t,a)=>{const s=f(e);if("X"===s)return-10+t;if("O"===s)return 10-t;if(e.every(Boolean))return 0;if(a){let a=-1/0;for(let s=0;s<e.length;s++)if(null===e[s]){e[s]="O";let r=A(e,t+1,!1);e[s]=null,a=Math.max(r,a)}return a}{let a=1/0;for(let s=0;s<e.length;s++)if(null===e[s]){e[s]="X";let r=A(e,t+1,!0);e[s]=null,a=Math.min(r,a)}return a}},[]),k=(0,s.useCallback)(e=>{let t=-1/0,a=null;for(let s=0;s<e.length;s++)if(null===e[s]){e[s]="O";let r=A(e,0,!1);e[s]=null,r>t&&(t=r,a=s)}return a},[A]),E=(0,s.useCallback)(()=>{const e=k(t);null!==e&&N(e)},[t,N,k]);(0,s.useEffect)(()=>{if(!j&&!w){const e=setTimeout(()=>E(),600);return()=>clearTimeout(e)}},[j,w,E]),(0,s.useEffect)(()=>{const e=f(t);e?(y(e),v({title:"Game Over",message:"".concat(e," has secured the grid.")})):t.every(Boolean)&&(y("Draw"),v({title:"Grid Lock",message:"No dominant sequence identified."}))},[t,v]);return(0,u.jsxs)("div",{className:"min-h-screen bg-[#050505] text-white selection:bg-emerald-500/30 font-sans",children:[(0,u.jsx)(h.A,{title:"Tic Tac Toe | Fezcodex",description:"Protocol for strategic grid alignment. Challenge the neural AI in a classic logical confrontation.",keywords:["Fezcodex","tic tac toe","game","ai game","strategy"]}),(0,u.jsxs)("div",{className:"mx-auto max-w-7xl px-6 py-24 md:px-12",children:[(0,u.jsxs)("header",{className:"mb-24",children:[(0,u.jsxs)(r.N_,{to:"/apps",className:"group mb-12 inline-flex items-center gap-2 text-xs font-mono text-gray-500 hover:text-white transition-colors uppercase tracking-[0.3em]",children:[(0,u.jsx)(i.A,{weight:"bold",className:"transition-transform group-hover:-translate-x-1"}),(0,u.jsx)("span",{children:"Applications"})]}),(0,u.jsx)("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-12",children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsx)("h1",{className:"text-6xl md:text-8xl font-black tracking-tighter text-white leading-none uppercase",children:e}),(0,u.jsx)("p",{className:"text-xl text-gray-400 max-w-2xl font-light leading-relaxed",children:"Neural grid protocol. Engage in archetypal pattern matching against the system's recursive decision matrix."})]})})]}),(0,u.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12",children:[(0,u.jsx)("div",{className:"lg:col-span-8 flex justify-center",children:(0,u.jsxs)("div",{className:"relative border border-white/10 bg-white/[0.02] p-8 md:p-16 rounded-sm overflow-hidden group flex flex-col items-center justify-center w-full max-w-2xl",children:[(0,u.jsx)("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none grayscale",children:(0,u.jsx)(g.A,{seed:e+w+t.join(""),className:"w-full h-full"})}),(0,u.jsxs)("div",{className:"relative z-10 w-full flex flex-col items-center gap-12",children:[(0,u.jsx)("div",{className:"grid grid-cols-3 gap-4 md:gap-8 p-4 bg-black/40 border border-white/5 rounded-sm shadow-inner",children:t.map((e,t)=>(0,u.jsx)("button",{onClick:()=>N(t),disabled:w||e||!j&&!w,className:"\n w-20 h-20 md:w-32 md:h-32 flex items-center justify-center border-4 transition-all duration-300\n ".concat("X"===e?"border-emerald-500 bg-emerald-500/10 text-emerald-500":"O"===e?"border-white bg-white/5 text-white":"border-white/5 hover:border-emerald-500/30 bg-black/20","\n ").concat(w||e?"cursor-default":"cursor-pointer","\n "),children:(0,u.jsxs)(n.N,{mode:"wait",children:["X"===e&&(0,u.jsx)(l.P.div,{initial:{scale:0,rotate:-45},animate:{scale:1,rotate:0},exit:{scale:0},children:(0,u.jsx)(x.u,{size:48,weight:"black"})}),"O"===e&&(0,u.jsx)(l.P.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,u.jsx)(o.G,{size:48,weight:"bold"})})]})},t))}),(0,u.jsx)("div",{className:"flex flex-wrap justify-center gap-6",children:(0,u.jsxs)("button",{onClick:()=>{a(Array(9).fill(null)),b(!0),y(null)},className:"group relative inline-flex items-center gap-4 px-12 py-6 bg-white text-black hover:bg-emerald-400 transition-all duration-300 font-mono uppercase tracking-widest text-sm font-black rounded-sm shadow-[0_0_30px_rgba(255,255,255,0.05)]",children:[(0,u.jsx)(c.o,{weight:"bold",size:24,className:"group-hover:rotate-180 transition-transform duration-500"}),(0,u.jsx)("span",{children:"Clear Grid"})]})})]})]})}),(0,u.jsxs)("div",{className:"lg:col-span-4 space-y-8",children:[(0,u.jsxs)("div",{className:"border border-white/10 bg-white/[0.02] p-8 rounded-sm space-y-10",children:[(0,u.jsxs)("h3",{className:"font-mono text-[10px] font-bold text-emerald-500 uppercase tracking-widest mb-10 flex items-center gap-2",children:[(0,u.jsx)(d.G,{weight:"fill"}),"Protocol_Status"]}),(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"p-6 border border-white/5 bg-white/[0.01] rounded-sm flex flex-col gap-2",children:[(0,u.jsx)("span",{className:"font-mono text-[10px] text-gray-600 uppercase",children:"Current_Control"}),(0,u.jsxs)("div",{className:"flex items-center gap-3",children:[j?(0,u.jsx)(m.n,{size:20,className:"text-emerald-500"}):(0,u.jsx)(d.G,{size:20,className:"text-white"}),(0,u.jsx)("span",{className:"text-xl font-black uppercase",children:j?"User_Alpha":"System_AI"})]})]}),(0,u.jsxs)("div",{className:"p-6 border rounded-sm flex flex-col gap-2 transition-all duration-500 ".concat(w?"bg-emerald-500/10 border-emerald-500/30":"bg-white/5 border-white/10"),children:[(0,u.jsx)("span",{className:"font-mono text-[10px] text-gray-600 uppercase",children:"Outcome_Registry"}),(0,u.jsx)("span",{className:"text-xl font-black uppercase ".concat("X"===w?"text-emerald-500":"text-white"),children:w?"Draw"===w?"Lockdown":"".concat("X"===w?"User":"AI","_Wins"):"Pending..."})]})]})]}),(0,u.jsx)("div",{className:"p-8 border border-white/10 bg-white/[0.01] rounded-sm",children:(0,u.jsx)("p",{className:"text-[10px] font-mono uppercase tracking-[0.2em] leading-relaxed text-gray-500",children:"The minimax algorithm ensures the system AI maintains an optimal strategic posture. Achieving victory requires identifying subtle structural vulnerabilities in the recursive logic."})})]})]}),(0,u.jsxs)("footer",{className:"mt-32 pt-12 border-t border-white/10 flex flex-col md:flex-row justify-between items-center gap-6 text-gray-600 font-mono text-[10px] uppercase tracking-[0.3em]",children:[(0,u.jsx)("span",{children:"Fezcodex_Strategy_Loom_v0.6.1"}),(0,u.jsxs)("span",{className:"text-gray-800",children:["MATRIX_STATUS // ",w?"TERMINATED":"ACTIVE"]})]})]})]})}},85528(e,t,a){a.d(t,{G:()=>i,j:()=>c});var s=a(89379),r=a(9950),n=a(35507),l=a(9808);const i=r.forwardRef((e,t)=>r.createElement(n.A,(0,s.A)((0,s.A)({ref:t},e),{},{weights:l.A})));i.displayName="CircleIcon";const c=i},89837(e,t,a){a.d(t,{A:()=>l});a(9950);var s=a(18905),r=a(44414);const n="https://fezcode.com",l=e=>{let{title:t,description:a,image:l,keywords:i,ogImage:c,twitterImage:o,type:d}=e;const m=(0,s.zy)();if(!t||"Fezcodex"===t||"fezcodex"===t)return null;const x=n+m.pathname,p=m.pathname.startsWith("/apps"),h=l||c||o||(p?"/images/asset/ogtitle-apps.png":"/images/asset/ogtitle.png"),g=h.startsWith("http")?h:n+(h.startsWith("/")?"":"/")+h,u=Array.isArray(i)?i.join(", "):i,f=d||(m.pathname.startsWith("/blog")?"article":"website");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("meta",{name:"description",content:a}),u&&(0,r.jsx)("meta",{name:"keywords",content:u}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{property:"og:description",content:a}),(0,r.jsx)("meta",{property:"og:image",content:g}),(0,r.jsx)("meta",{property:"og:url",content:x}),(0,r.jsx)("meta",{property:"og:type",content:f}),(0,r.jsx)("meta",{property:"og:site_name",content:"Fezcodex"}),g.startsWith("https")&&(0,r.jsx)("meta",{property:"og:image:secure_url",content:g}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:title",content:t}),(0,r.jsx)("meta",{name:"twitter:description",content:a}),(0,r.jsx)("meta",{name:"twitter:image",content:g}),(0,r.jsx)("meta",{name:"twitter:url",content:x}),(0,r.jsx)("link",{rel:"canonical",href:x})]})}}}]);