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

Function hasVisibleCellAt

src/ink/screen.ts:734–747  ·  view source on GitHub ↗
(screen: Screen, x: number, y: number)

Source from the content-addressed store, hash-verified

732}
733
734export function hasVisibleCellAt(screen: Screen, x: number, y: number): boolean {
735 if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) {
736 return false
737 }
738 const ci = (y * screen.width + x) << 1
739 const charId = screen.cells[ci]!
740 if (charId === 1) {
741 return false
742 }
743 if (charId !== 0) {
744 return true
745 }
746 return (screen.cells[ci + 1]! & 0x3fffc) !== 0
747}
748
749export type FillableSpaceGapBlocker =
750 | 'none'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected