(1) _tile_pos should not use ceil, but instead floor (2) distance/3 is removed and replaced with the build-in dist/2 method of class Point (see utils.py)