I'm not sure if that's really a problem or not. You can't sensibly have more then one door instance running at a time.
It makes the code simpler to just check the global, rather then having everything need an instance of the Door structure.
There are many variables in the door namespace.
I'm not sure if that's really a problem or not. You can't sensibly have more then one door instance running at a time.
It makes the code simpler to just check the global, rather then having everything need an instance of the Door structure.
It might make it simpler for users to use the library if all of the variables are in the door, rather then some in the structure, and some in the namespace.
It might make it simpler for users to use the library if all of the variables are in the door, rather then some in the structure, and some in the namespace.
Also, it isn't like you're going to have multiple connections into the door. (Global variables might be OK here, really. We're not going to have multiple users in the same door. We can't.)
Also, it isn't like you're going to have multiple connections into the door. (Global variables might be OK here, really. We're not going to have multiple users in the same door. We can't.)
There are many variables in the door namespace.
I'm not sure if that's really a problem or not. You can't sensibly have more then one door instance running at a time.
It makes the code simpler to just check the global, rather then having everything need an instance of the Door structure.
It might make it simpler for users to use the library if all of the variables are in the door, rather then some in the structure, and some in the namespace.
Also, it isn't like you're going to have multiple connections into the door. (Global variables might be OK here, really. We're not going to have multiple users in the same door. We can't.)