2026-10-17 10:49:38 +00:00
< script setup lang = "ts" >
2026-10-20 17:29:16 +00:00
import { shortCount } from '~/lib/logic/analyze'
2026-10-17 10:49:38 +00:00
import { CHALLENGES } from '~/lib/logic/challenges'
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
import { campaignProgress , challengeName , challengeOpen , defUsable , isCampaign , KIND _UNLOCK , NEEDS } from '~/lib/logic/progress'
import { weekKey , weeklyId } from '~/lib/logic/puzzles'
2026-10-17 10:49:38 +00:00
import type { ComponentDef , NodeKind } from '~/lib/logic/types'
const ed = useEditor ( )
const tab = ref < 'parts' | 'challenges' > ( 'parts' )
const query = ref ( '' )
const BASICS : { kind : NodeKind ; name : string ; icon : string ; key ? : string ; hint : string } [ ] = [
{ kind : 'nand' , name : 'NAND' , icon : 'lucide:square-function' , key : 'N' , hint : 'The one logic gate. Output is 0 only when both inputs are 1.' } ,
{ kind : 'input' , name : 'Input' , icon : 'lucide:toggle-left' , key : 'I' , hint : 'A switch. Inside a component it becomes an input pin.' } ,
{ kind : 'output' , name : 'Output' , icon : 'lucide:log-out' , key : 'O' , hint : 'Shows a value. Inside a component it becomes an output pin.' } ,
{ kind : 'lamp' , name : 'Lamp' , icon : 'lucide:lightbulb' , key : 'L' , hint : 'Lights up at 1.' } ,
{ kind : 'button' , name : 'Push button' , icon : 'lucide:circle-dot' , key : 'B' , hint : '1 while held down.' } ,
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
{ kind : 'panel' , name : 'Input panel' , icon : 'lucide:sliders-vertical' , key : 'P' , hint : 'A column of switches, buttons and clocks. On a component, "Attach input panel" makes one for its inputs.' } ,
2026-10-17 10:49:38 +00:00
{ kind : 'clock' , name : 'Clock' , icon : 'lucide:audio-waveform' , key : 'C' , hint : 'Square wave. Speed and pause are in the top bar.' } ,
{ kind : 'high' , name : 'Constant 1' , icon : 'lucide:plus' , hint : 'Always 1, like the supply rail.' } ,
{ kind : 'low' , name : 'Ground (0)' , icon : 'lucide:arrow-down-to-line' , hint : 'Always 0.' } ,
{ kind : 'hex' , name : 'Hex display' , icon : 'lucide:binary' , key : 'H' , hint : 'Shows 4 bits as 0– F.' } ,
2026-10-20 17:29:16 +00:00
{ kind : 'pixel' , name : 'Pixel' , icon : 'lucide:square' , key : 'X' , hint : 'One square of a screen, lit at 1. Pixels inside a component show on its box as one screen: build your own LCD.' } ,
{ kind : 'bundle' , name : 'Cable bundle' , icon : 'lucide:merge' , hint : 'Gathers several wires into one cable. Or select wires and press "Bundle into cable".' } ,
{ kind : 'split' , name : 'Cable split' , icon : 'lucide:split' , hint : 'Fans a cable out into its wires again.' } ,
2026-10-17 10:49:38 +00:00
{ kind : 'note' , name : 'Note' , icon : 'lucide:sticky-note' , key : 'T' , hint : 'Text label for your drawing.' } ,
]
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
const GROUP _ORDER = [ '' , 'Puzzles' , 'Gates' , 'Routing' , 'Arithmetic' , 'Memory' , 'Displays' , 'Demos' ]
2026-10-17 10:49:38 +00:00
const groups = computed ( ( ) => {
const q = query . value . trim ( ) . toLowerCase ( )
const map = new Map < string , ComponentDef [ ] > ( )
for ( const d of ed . project . value . components ) {
if ( q && ! d . name . toLowerCase ( ) . includes ( q ) ) continue
const g = d . group ? . trim ( ) ? ? ''
if ( ! map . has ( g ) ) map . set ( g , [ ] )
map . get ( g ) ! . push ( d )
}
const rank = ( g : string ) => ( GROUP _ORDER . includes ( g ) ? GROUP _ORDER . indexOf ( g ) : GROUP _ORDER . length )
return [ ... map . entries ( ) ]
. sort ( ( [ a ] , [ b ] ) => rank ( a ) - rank ( b ) || a . localeCompare ( b ) )
. map ( ( [ name , defs ] ) => ( { name : name || 'My components' , defs } ) )
} )
function pick ( kind : NodeKind , chip ? : string ) {
if ( chip && ! ed . canPlace ( chip ) ) return
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
if ( ! ed . canPlaceKind ( kind ) ) {
ed . play ( 'error' )
return ed . notify ( lockedHint ( kind ) , 'error' )
}
2026-10-17 10:49:38 +00:00
ed . placing . value = { kind , chip }
}
function onDragStart ( e : DragEvent , kind : NodeKind , chip ? : string ) {
if ( chip && ! ed . canPlace ( chip ) ) {
e . preventDefault ( )
return
}
e . dataTransfer ? . setData ( 'application/x-logigate' , JSON . stringify ( { kind , chip } ) )
if ( e . dataTransfer ) e . dataTransfer . effectAllowed = 'copy'
}
const solved = computed ( ( ) => new Set ( ed . project . value . solved ) )
2026-10-20 17:29:16 +00:00
const best = computed ( ( ) => ed . project . value . best ? ? { } )
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
const solvedCount = computed ( ( ) => CHALLENGES . filter ( c => solved . value . has ( c . id ) ) . length )
const campaign = computed ( ( ) => isCampaign ( ed . project . value ) )
const progress = computed ( ( ) => campaignProgress ( ed . project . value ) )
const open = ( id : string ) => challengeOpen ( ed . project . value , id )
const needsText = ( id : string ) => ` Solve ${ ( NEEDS [ id ] ? ? [ ] ) . filter ( n => ! solved . value . has ( n ) ) . map ( challengeName ) . join ( ' and ' ) } first `
const puzzles = computed ( ( ) => ( ed . project . value . puzzles ? ? [ ] ) . filter ( p => ! p . id . startsWith ( 'week:' ) || p . id === weeklyId ( weekKey ( ) ) ) )
const weeklyStarted = computed ( ( ) => ed . project . value . components . some ( d => d . challenge === weeklyId ( weekKey ( ) ) ) )
function lockedHint ( kind : NodeKind ) {
const by = KIND _UNLOCK [ kind ]
return by ? ` Solve the ${ challengeName ( by ) } challenge to unlock this part ` : ''
}
function openWeekly ( ) {
const spec = ed . project . value . puzzles ? . find ( p => p . id === weeklyId ( weekKey ( ) ) )
if ( spec ) ed . beginPuzzle ( spec )
else void ed . openPuzzle ( 'weekly' )
}
function compTitle ( d : ComponentDef ) {
if ( d . id === ed . def . value . id ) return 'You are editing this one'
if ( ! defUsable ( ed . project . value , d ) ) return 'Solve this challenge to use it as a part'
if ( ! ed . canPlace ( d . id ) ) return 'Contains the circuit you are editing'
return d . description || 'Click, then click on the canvas to place'
}
2026-10-17 10:49:38 +00:00
const started = computed ( ( ) => new Map ( ed . project . value . components . filter ( d => d . challenge ) . map ( d => [ d . challenge ! , d ] ) ) )
< / script >
< template >
< aside class = "palette" >
< div class = "tabs" >
< button : class = "{ active: tab === 'parts' }" @ click = "tab = 'parts'" > Parts < / button >
< button : class = "{ active: tab === 'challenges' }" @ click = "tab = 'challenges'" >
Challenges
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< span class = "count" > { { solvedCount } } / { { CHALLENGES . length } } < / span >
2026-10-17 10:49:38 +00:00
< / button >
2026-10-21 08:09:43 +00:00
< button class = "collapse-btn" title = "Hide this panel ([)" @ click = "ed.toggleSidebar('left', false)" >
< Icon name = "lucide:panel-left-close" class = "size-4" / >
< / button >
2026-10-17 10:49:38 +00:00
< / div >
< div v-if ="tab === 'parts'" class="scroll" >
< h3 > Basics < / h3 >
< ul class = "items" >
< li v-for ="item in BASICS" :key="item.kind" >
< button
class = "item"
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
: class = "{ active: ed.placing.value?.kind === item.kind && !ed.placing.value?.chip, blocked: !ed.canPlaceKind(item.kind) }"
: title = "ed.canPlaceKind(item.kind) ? item.hint : lockedHint(item.kind)"
: draggable = "ed.canPlaceKind(item.kind)"
2026-10-17 10:49:38 +00:00
@ click = "pick(item.kind)"
@ dragstart = "onDragStart($event, item.kind)"
>
< span v-if ="item.kind === 'nand'" class="nand-badge" > & amp ; < / span >
< Icon v -else :name ="item.icon" class = "size-4 shrink-0 text-(--muted)" / >
< span class = "grow truncate" > { { item . name } } < / span >
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
< span v-if ="item.kind === 'nand'" class="tcount" title="4 transistors: a CMOS NAND gate" > 4T < / span >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< Icon v -if = " ! ed.canPlaceKind ( item.kind ) " name = "lucide:lock" class = "size-3.5 shrink-0 text-(--muted)" / >
< kbd v -else -if = " item.key " > { { item . key } } < / kbd >
2026-10-17 10:49:38 +00:00
< / button >
< / li >
< / ul >
< div class = "search" >
< Icon name = "lucide:search" class = "size-3.5 text-(--muted)" / >
< input v -model = " query " placeholder = "Find component" / >
< / div >
< template v-for ="g in groups" :key="g.name" >
< h3 > { { g . name } } < / h3 >
< ul class = "items" >
< li v-for ="d in g.defs" :key="d.id" class="comp-row" >
< button
class = "item"
: class = "{ active: ed.placing.value?.chip === d.id, current: d.id === ed.def.value.id, blocked: !ed.canPlace(d.id) }"
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
: title = "compTitle(d)"
2026-10-17 10:49:38 +00:00
: draggable = "ed.canPlace(d.id)"
@ click = "pick('chip', d.id)"
@ dragstart = "onDragStart($event, 'chip', d.id)"
>
< Icon : name = "d.challenge && solved.has(d.challenge) ? 'lucide:badge-check' : 'lucide:box'" class = "size-4 shrink-0" : class = "d.challenge && solved.has(d.challenge) ? 'text-(--on)' : 'text-(--muted)'" / >
< span class = "grow truncate" > { { d . name } } < / span >
< span v-if ="d.id === ed.def.value.id" class="editing" > editing < / span >
2026-10-20 17:29:16 +00:00
< span v -else -if = " ed.transistors ( d.id ) " class = "tcount" : title = "`${ed.transistors(d.id).toLocaleString()} transistors`" > { { shortCount ( ed . transistors ( d . id ) ) } } T < / span >
2026-10-17 10:49:38 +00:00
< / button >
< button v-if ="d.id !== ed.def.value.id" class="open" title="Open and edit" @click="ed.open(d.id)" >
< Icon name = "lucide:pencil" class = "size-3.5" / >
< / button >
< / li >
< / ul >
< / template >
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
< div class = "grid gap-2 px-3 pt-2 pb-4" >
2026-10-17 10:49:38 +00:00
< button class = "btn w-full" @click ="ed.createComponent()" >
< Icon name = "lucide:plus" class = "size-4" / > New component
< / button >
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
< button class = "btn btn-ghost w-full" title = "NOT, AND, … up to a 4-bit counter, all built from NAND" @click ="ed.loadExamples()" >
< Icon name = "lucide:library" class = "size-4" / > Add example parts
< / button >
2026-10-17 10:49:38 +00:00
< / div >
< / div >
< div v -else class = "scroll" >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< div v-if ="campaign" class="campaign" >
< div class = "flex items-center justify-between" >
< span class = "font-semibold" > Campaign < / span >
< span class = "tabular-nums text-(--muted)" > { { solvedCount } } / { { CHALLENGES . length } } < / span >
< / div >
< div class = "bar" > < span : style = "{ width: `${progress * 100}%` }" / > < / div >
< p > Every part you solve becomes yours to use . New parts and challenges open as you go . < / p >
< / div >
< p v -else class = "intro" >
2026-10-17 10:49:38 +00:00
Build each part from NAND and the parts you already made . Start a challenge , wire it up , then press
< strong > Check < / strong > on the right .
< / p >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< div class = "weekly" >
< div class = "flex items-center gap-2" >
< Icon name = "lucide:calendar-days" class = "size-4 shrink-0 text-(--accent)" / >
< span class = "grow font-medium" > Puzzle of the week < / span >
< button class = "btn-sm" @click ="openWeekly" > {{ weeklyStarted ? ' Open ' : ' Play ' }} < / button >
< / div >
< p > A new logic puzzle every Monday , the same for everyone . Fewest transistors wins . < / p >
< / div >
< template v-if ="puzzles.length" >
< h3 > Puzzles < / h3 >
< ul class = "challenges" >
< li v-for ="p in puzzles" :key="p.id" :class="{ solved: solved.has(p.id) }" >
< div class = "flex items-center gap-2" >
< Icon : name = "solved.has(p.id) ? 'lucide:circle-check' : 'lucide:puzzle'" class = "size-4 shrink-0" : class = "solved.has(p.id) ? 'text-(--on)' : 'text-(--muted)'" / >
< span class = "grow font-medium" > { { p . name } } < / span >
< button class = "btn-sm" @click ="ed.beginPuzzle(p)" > Open < / button >
< / div >
< p class = "pins" >
{ { p . inputs . join ( ', ' ) } } → { { p . outputs . join ( ', ' ) } }
< span v-if ="best[p.id] !== undefined" class="best" > · best {{ best [ p.id ] ! .toLocaleString ( ) }} transistors < / span >
< / p >
< / li >
< / ul >
< / template >
< h3 > Challenges < / h3 >
2026-10-17 10:49:38 +00:00
< ul class = "challenges" >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< li v-for ="c in CHALLENGES" :key="c.id" :class="{ solved: solved.has(c.id), locked: !open(c.id) }" >
2026-10-17 10:49:38 +00:00
< div class = "flex items-center gap-2" >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< Icon
: name = "solved.has(c.id) ? 'lucide:circle-check' : open(c.id) ? 'lucide:circle' : 'lucide:lock'"
class = "size-4 shrink-0"
: class = "solved.has(c.id) ? 'text-(--on)' : 'text-(--muted)'"
/ >
2026-10-17 10:49:38 +00:00
< span class = "grow font-medium" > { { c . name } } < / span >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< button class = "btn-sm" : disabled = "!open(c.id) && !started.has(c.id)" : title = "open(c.id) ? '' : needsText(c.id)" @click ="ed.beginChallenge(c)" >
{ { started . has ( c . id ) ? 'Open' : 'Start' } }
< / button >
2026-10-17 10:49:38 +00:00
< / div >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< p v-if ="!open(c.id)" class="needs" > {{ needsText ( c.id ) }} < / p >
2026-10-17 10:49:38 +00:00
< p > { { c . goal } } < / p >
2026-10-20 17:29:16 +00:00
< p class = "pins" >
{ { c . inputs . join ( ', ' ) } } → { { c . outputs . join ( ', ' ) } }
< span v-if ="best[c.id] !== undefined" class="best" title="Fewest transistors in a passing solution so far" >
· best { { best [ c . id ] ! . toLocaleString ( ) } } transistors
< / span >
< / p >
2026-10-17 10:49:38 +00:00
< / li >
< / ul >
< / div >
< / aside >
< / template >