gamnit :: TileSet :: []
x, y
Require: x < nb_cols and y < nb_rows
x < nb_cols and y < nb_rows
# Subtexture for the tile at `x, y` # # Require: `x < nb_cols and y < nb_rows` fun [](x,y: Int): Texture do assert x >= 0 and x < nb_cols and y >= 0 and y <= nb_rows else print "{x}x{y}<?{nb_cols}x{nb_rows}" var idx = x + y * nb_cols return subtextures[idx] end