implemented cost_of_tile in lisp