Skip to content

Releases: infrareactive/sci-fi-cyber-chess

Cyber Chess v10 (Neural Chat Edition)

23 Jan 14:21
482e58f

Choose a tag to compare

Pre-release

​💾 ### Cyber Chess v10 (Neural Chat Edition)

New Features Added:

​Encrypted Comms (Chat): A sliding chat drawer on the right side.
​Notification System: The chat button will glow cyan when you have an unread message.
​Auto-Scroll: The chat window automatically stays at the bottom for the latest messages.
​System Messages: Notifies you when a link is established or if a move is made.

What's Changed

Full Changelog: https://github.com/infrareactive/sci-fi-cyber-chess/commits/Cyber-Chess_v10

``

<title>Cyber Chess v10: Neural Link</title> <script src="https://unpkg.com/peerjs@1.5.4/dist/peerjs.min.js"></script> <style> :root { --neon-cyan: #00ffff; --neon-magenta: #ff00ff; --bg-dark: #0a0a0a; --glass: rgba(255, 255, 255, 0.05); } body { background: #111; color: #eee; font-family: 'Segoe UI', sans-serif; text-align: center; } #cyberChessSection { background: var(--bg-dark); min-height: 100vh; padding: 2rem 0; } .chess-title { font-size: 3rem; font-weight: 800; background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-transform: uppercase; } #connectionPanel { max-width: 500px; margin: 20px auto; border: 1px solid #333; padding: 15px; border-radius: 8px; background: rgba(0,0,0,0.3); } .chessboard-container { display: flex; justify-content: center; margin: 20px 0; } .chessboard { width: 500px; height: 500px; display: grid; grid-template-columns: repeat(8, 1fr); border: 4px solid var(--neon-cyan); } .square { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; } .light { background: #2a2a2a; } .dark { background: #1a1a1a; } .piece { font-size: 3rem; } .white { color: #fff; } .black { color: var(--neon-magenta); } .cyber-btn { background: transparent; border: 1px solid var(--neon-cyan); color: var(--neon-cyan); padding: 10px 20px; margin: 5px; cursor: pointer; font-weight: bold; } .cyber-btn:hover { background: var(--neon-cyan); color: #000; } </style>

Cyber Chess v10

System: Waiting for peer...
MY ID (Click to Copy): Loading...
LINK
RESET UNDO
<script> const network = { peer: new Peer(), conn: null, init() { this.peer.on('open', id => document.getElementById('myIdDisplay').innerText = "MY ID (Click to Copy): " + id); this.peer.on('connection', c => { this.conn = c; this.setup(); }); }, connectToPeer() { this.conn = this.peer.connect(document.getElementById('peerIdInput').value); this.setup(); }, setup() { this.conn.on('open', () => document.getElementById('status').innerText = "System: Linked"); this.conn.on('data', data => { if(data.type==='MOVE') game.executeMove(data.f, data.t, true); }); } }; function copyId() { navigator.clipboard.writeText(document.getElementById('myIdDisplay').innerText.split(': ')[1]); alert("ID Copied!"); } const game = { board: [['R','N','B','Q','K','B','N','R'],['P','P','P','P','P','P','P','P'],[null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null],['p','p','p','p','p','p','p','p'],['r','n','b','q','k','b','n','r']], turn: 'white', selected: null, symbols: { white: {k:'♔',q:'♕',r:'♖',b:'♗',n:'♘',p:'♙'}, black: {k:'♚',q:'♛',r:'♜',b:'♝',n:'♞',p:'♟'} }, render() { const b = document.getElementById('chessboard'); b.innerHTML = ''; for(let r=0; r<8; r++) for(let c=0; c<8; c++) { const s = document.createElement('div'); s.className = `square ${(r+c)%2?'dark':'light'}`; const p = this.board[r][c]; if(p) { const el = document.createElement('div'); el.className = `piece ${p===p.toLowerCase()?'white':'black'}`; el.textContent = this.symbols[p===p.toLowerCase()?'white':'black'][p.toLowerCase()]; s.appendChild(el); } s.onclick = () => this.click(r,c); b.appendChild(s); } }, click(r,c) { const p = this.board[r][c]; if(p && (this.turn==='white' ? p===p.toLowerCase() : p===p.toUpperCase())) { this.selected = {r,c}; } else if(this.selected) { this.executeMove(this.selected, {r,c}); this.selected = null; } this.render(); }, executeMove(f, t, remote=false) { this.board[t.r][t.c] = this.board[f.r][f.c]; this.board[f.r][f.c] = null; this.turn = this.turn==='white'?'black':'white'; if(!remote && network.conn) network.conn.send({type:'MOVE', f, t}); this.render(); } }; game.render(); network.init(); </script>

What's Changed

Full Changelog: https://github.com/infrareactive/sci-fi-cyber-chess/commits/Cyber-Chess_v10