Previous Tile Positions Next

Several functions exist which can test the position of a tile with respect to another.

Northof(tile1,tile2)
Southof(tile1,tile2)
Westof(tile1,tile2)
Eastof(tile1,tile2)

These return true if tile1 is in that direction from tile2. Switch to the world All Here and try these sentences, which are all true:

Northof(e,f)
Southof(a,b)
Westof(c,f)
Eastof(f,e)

SameRow(tile1,tile2) and SameCol(tile1,tile2)
return true if the two tiles are on the same row or column. Switch to the world All Here Revisted and try these sentences:

SameRow(c,f)
SameCol(a,b)
SameCol(a,b) and SameRow(b,d)

The Between(tile1,tile2,tile3) function returns true if tile1 lies discretely between tile2 and tile3. This means that the centers of the cells containing these 3 tiles must lie on a straight line and tile1 is the middle tile of the three.

For example, in the Blocks Abundant world, all these are true:
Between(g,a,f)
Between(g,f,a)
Between(j,a,h)
Between(b,a,c)
Between(c,g,d)
Between(e,h,i)
Between(d,a,e)
but these are false:
Between(a,g,f)
Between(b,a,g)
Between(b,a,i)
Between(d,j,i)

If-then Tests
Index