ok right now im working on a roguelike. and i need to draw the room door. i have a class called room which has the integer width and height as private ofcoarse and in main i have the object MyRoom. but i have the function for the doorposition which is
this would be all fine and good.. but i need the ROOM width and height.. so im looking for something likeCode:void room::DoorPosition(int DX,int DY) { DX = getWidth(); DY = getBreadth(); DoorPositionX = Width; DoorPositionY = DY; console.Draw(DoorPositionX,DoorPositionY,FloorTileASCII); }
room.getWidth();
room.getHeight();
so what im looking for is a way to get the width and height of every room in the game without the hassle of
room1.getwidth();
room2.getwidth();
etc etc,