pong-typescript: start here, new grug
A one-file Pong game in TypeScript: one Game value holds the round, one input snapshot per frame, and a fixed-step loop spends elapsed time in equal slices.
grug is the cave guide: an engineer learning this codebase. the six levels name how deeply a page explains it; the quiz badge says which questions you answered.
Start here.
junior grug: meet the model is the first page of the route.
Read the route: junior grug: meet the model See the one Game value that holds the round. · junior grug: snapshot the keys Read keys once so one frame sees one input. · junior grug: draw from state Read the same state to draw the frame and the score. · mid grug: step in equal slices Spend elapsed time in fixed steps with an accumulator cap. · mid grug: split the collisions Fix x and y in separate passes so a corner cannot trap the ball.
Look it up later: the full reference holds the path, the measured inventory, the chapters and the level rubric.
every teaching tool on these pages has a reason. why grug give tools answers that question for each one.
what this codebase is and what machine it takes, in the school's own words: pong-typescript is a pong clone in TypeScript with no runtime dependencies: one Game object, two paddles, one ball, a score, and a loop that reads the keyboard into one Input value, spends elapsed time in equal slices to change one Game value, and returns drawing commands from what that value holds. Two paddles stand at the left and right edges. A ball travels between them. You move the left paddle with the keyboard; a simple opponent moves the right one. When the ball passes a paddle, the other side gains a point, the ball returns to the centre and waits, then serves again. Every bounce lands in the same place on any machine, which is the property the whole school builds on.
Game object, two paddles, one ball, a score, and a loop that reads the keyboard into one Input value, spends elapsed time in equal slices to change one Game value, and returns drawing commands from what that value holds. Two paddles stand at the left and right edges. A ball travels between them. You move the left paddle with the keyboard; a simple opponent moves the right one. When the ball passes a paddle, the other side gains a point, the ball returns to the centre and waits, then serves again. Every bounce lands in the same place on any machine, which is the property the whole school builds on.The review ledger records the name or role the school supplied for each review. When the school wrote a generic role such as school author, the ledger says that role.
reference and counts
then see the map and the pop quiz and the offline track and the current state and what the school checked and why grug give the tools.
the measured project table holds 1 production projects in 1 languages. A language the table does not tally still ships as source.
the risk catalog records 0 answers in code, 4 partial, 2 missing, 15 not applicable.
MIGHT: evidence exists and nothing is established; it has a count and mode. WOULD: it held for each of a named set under claim-grade replays.