Context:
So basically I've got a class Map
which contains a name and another class called Room
. Room
contains an int for the amount of doors it has, and a class called Door
. Door
contains a char for the position of the door, which can be N(orth), E(ast), S(outh), W(est).
Question:
This is how I've setup my Room
class:
public class Room {
int doors;
Door door;
public Room(int doors, Door door) {
this.doors = doors;
this.door = door;
}
}
But this way I can only give it 1 door, and I need to be able to assign an amount of doors that's equivalent to the value of the int doors. Any ideas?