#include #include #include void room_draw(int width, int height, unsigned exits) { unsigned x,y; int pos[4]; pos[0]=exits&1?rand()%width:-1; pos[1]=exits&2?rand()%width:-1; pos[2]=exits&4?rand()%height:-1; pos[3]=exits&8?rand()%height:-1; for(x=0;x