Completed tile_cost.py