返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: A "falling block puzzle game"

Four games of Tetris played simultaneously. The corners overlap.Hidden Easter egg if you've got the chops (I certainly don't haha)glhf

Hacker News 最新HoneySpoons2026/10/16 · 2026/10/167 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

; else if (!Array.isArray(f)) paths = Object.entries(f).map(([ch, c]) => ``).join(''); // one colour per character else { // per-pixel colour: one path per colour const by = {}; rows.forEach((row, y) => [...row].forEach((c, x) => { if (c === '#') (by['#' + f[y].split(' ')[x]] ||= []).push(M${x} ${y}h1v1h-1z); })); paths = Object.entries(by).map(([c, d]) => ``).join(''); } return ${paths}; } // The copy and the link. GoatCounter takes ?ref= as the referrer, so share arrivals count as "share". const SHARE_URL = 'https://tetracube.fun/?ref=share'; function shareText(r) { if (r.score ${t}\n${SHARE_URL}; // The OS share sheet only on a touch device that has one: desktop Safari and Chrome on Windows have navigator.share too, // and there the row is the better answer. const nativeShare = () => document.body.classList.contains('touch') && typeof navigator.share === 'function'; // name: the label line while the cursor is on it. aria: what a screen reader hears. Facebook and LinkedIn take a link // only and build the card from the page's OG tags. Instagram has no web share URL: with a sheet it opens the sheet, // without one it copies the text and opens instagram.com, and says so. function shareTargets(t) { const sheet = nativeShare(), NEW = ' (opens in a new tab)'; return [ { k: 'copy', act: 'copy', name: 'COPY TEXT + LINK', aria: 'Copy your score and the link' }, { k: 'x', href: https://x.com/intent/post?text=${enc(t)}&url=${enc(SHARE_URL)}`, name: 'POST ON X ↗', aria: 'Post on X' + NEW }, { k: 'bsky', href: https://bsky.app/intent/compose?text=${enc(t + ' ' + SHARE_URL)}, name: 'POST ON BLUESKY ↗', aria: 'Post on Bluesky' + NEW }, { k: 'fb', href: https://www.facebook.com/sharer/sharer.php?u=${enc(SHARE_URL)}, name: 'SHARE ON FACEBOOK ↗', aria: 'Share on Facebook' + NEW }, sheet ? { k: 'ig', act: 'share', name: 'SHARE TO INSTAGRAM', aria: 'Share to Instagram, from the share sheet' } : { k: 'ig', act: 'ig', href: 'https://www.instagram.com/', name: 'COPY FOR INSTAGRAM ↗', aria: 'Copy your score for Instagram, and open Instagram' + NEW }, { k: 'in', href: https://www.linkedin.com/sharing/share-offsite/?url=${enc(SHARE_URL)}, name: 'SHARE ON LINKEDIN ↗', aria: 'Share on LinkedIn' + NEW }, ...(sheet ? [{ k: 'more', act: 'share', name: 'MORE WAYS TO SHARE', aria: 'More ways to share, from the share sheet' }] : []), ]; } const shareRun = () => ({ score, mode: (ov ?? { mode: runMode() }).mode, rank: ov?.rank, built: cubes > 0 }); // built: this run, not o.cube (cleared on save) function shareHtml() { const btn = x => x.href ? ${iconSvg(x.k)} : ${iconSvg(x.k)}; return `SHARE

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →