(screen: Screen, x: number, y: number)
| 591 | * this is intentional as cells are stored packed, not as objects. |
| 592 | */ |
| 593 | export function cellAt(screen: Screen, x: number, y: number): Cell | undefined { |
| 594 | if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) |
| 595 | return undefined |
| 596 | return cellAtIndex(screen, y * screen.width + x) |
| 597 | } |
| 598 | /** |
| 599 | * Get a Cell view by pre-computed array index. Skips bounds checks and |
| 600 | * index computation — caller must ensure index is valid. |
no test coverage detected