Repository navigation
Own backend: programs, owners and players (step 7) - #47
Merged
Merged
Conversation
Every program of a script, each as every player it runs for: a run per program, one for each of its players' slots for a per-player program, each with variables of its own but the shared ones. The start-up is in every player's triggers and links each list to an entry of that player's own, alone in it; a gate lets the walk into the runs from the first player still in the game, so a player who leaves stops nobody else's programs (the game frees a leaver's list by its next pointers: only the entry is reachable from it). Prints to a force and All Players go to the map's slots; hasLeft is one condition. Played in the lifted game against eudplib's build: the probes own-programs, fog-lib and own-leaver (a game of two, either leaving) the same frame for frame. Also fixed: a program whose first statement jumps (let done = false) lost the jump in a map of our own, and the walk came in at the true side. Ledger: step 7 27 of 28 (a program owned by P12 refused on purpose). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 7 of the way off eudplib: several programs in one map, programs for several players, and the walk surviving a player who leaves.
What changed
own.ts: a run per program, and one for each player of a per-player program (owners checked against the map's slots and forces, as the Python side'sowner_slots). Each run's graph has its own labels, scratch cells and variables, exceptsharedones, which belong to the program. Nothing is indexed by player while the game runs: the program is copied for each player. That is faster, and the payload grows with each copy.layout.ts: each run's@wakealso checks that its player's list is not empty (eudplib'sf_playerexist). The start-up goes in every player's triggers and links each list to an entry node of that player's own, alone in the list. A gate lets the walk into the runs only when every player before this one has an empty list.emit.ts: prints to All Players or a force use the map's human and computer slots.hasLeft(p)is one condition, as eudplib's.build-own.mts:PEOPLEand// probe-players:as in build-fixture; the map's slots and forces passed through.let done = false) lost the jump in a map of our own, and the walk came in at the true side. eudplib's build was right.Ledger: step 7, 27 of 28 (a program owned by P12 is refused on purpose, as Python refuses it). Nothing outside step 7 flipped to takes; three rows of steps 11 and 12 kept their refusals, now naming their own step's feature. New rows:
array-per-player,recursion-per-player,owner-player-twelve,boolean-declared-first.own-programsstart: 5 runs of 4 programsfog-lib: the fog library's program, a frameChecked
probes/own-programs.ts: built both ways, the same lines at the same frames, every line ok.probes/fog-lib.ts: the tile flags hash the same in both builds every frame.probes/own-leaver.ts: a game of two people, either leaving at frame 40, each player's deaths the same in both builds at every frame.npx vitest run: 1267 passed.probes/own-programs.tsis in Maps/TrigScript asown-step7.scxwith an answer sheet, for Remastered.🤖 Generated with Claude Code
https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom