(screen: Screen | undefined)
| 58 | } |
| 59 | |
| 60 | function 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 | |
| 73 | type RowDiff = { |
| 74 | row: number |
no test coverage detected