Added the room alotment algorithm