(screen: Screen, x: number, y: number)
| 632 | * this is intentional as cells are stored packed, not as objects. |
| 633 | */ |
| 634 | export function cellAt(screen: Screen, x: number, y: number): Cell | undefined { |
| 635 | if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) |
| 636 | return undefined |
| 637 | return cellAtIndex(screen, y * screen.width + x) |
| 638 | } |
| 639 | /** |
| 640 | * Get a Cell view by pre-computed array index. Skips bounds checks and |
| 641 | * index computation — caller must ensure index is valid. |
no test coverage detected