isroom
int isroom(int, int);
if (!isroom(u.ux + xdir[ui], u.uy + ydir[ui]))
if (isroom(u.ux + xdir[ui], u.uy + ydir[ui]))