MCPcopy Create free account
hub / github.com/Noumena-Network/code / screenRows

Function screenRows

src/commands/repaint/repaint.ts:60–71  ·  view source on GitHub ↗
(screen: Screen | undefined)

Source from the content-addressed store, hash-verified

58}
59
60function screenRows(screen: Screen | undefined): string[] {
61 if (!screen) return []
62 const rows: string[] = []
63 for (let y = 0; y < screen.height; y += 1) {
64 let row = ''
65 for (let x = 0; x < screen.width; x += 1) {
66 row += cellAt(screen, x, y)?.char ?? ' '
67 }
68 rows.push(row.trimEnd())
69 }
70 return rows
71}
72
73type RowDiff = {
74 row: number

Callers 1

Calls 1

cellAtFunction · 0.85

Tested by

no test coverage detected