renamed getMid(x,y) to getTile(x,y)