in_bounds

gtravyl.in_bounds(pt: tuple[int, int], dim: tuple[int, int]) bool

Checks if the candidate point actually exists in the grid.

Parameters:
  • pt – The point to check if it is in bounds.

  • dim – Dimensions (row, column) of the grid.