Grid (tabletop v0.2.4)

This module provides functions specific to traversing a square board where positions are represented by 2D coordinate Tuples.

Link to this section Summary

Functions

Adds two coordinates together and returns the sum.

Returns a list of neighbours from the given position, 1 unit in each cardinal direction.

Link to this section Functions

Link to this function

add(arg1, arg2)

Adds two coordinates together and returns the sum.

Link to this function

cardinal_points(arg)

Returns a list of neighbours from the given position, 1 unit in each cardinal direction.