I'm making an online card game project but now I have a minor issue:
In my game there are rooms that users can join. How do I find out how many created rooms there are? I thought about using a static counter but it didn't work. (I thing that the reason it didn't work is because every process is run on a separated thread so using static keyword wont help me solve this problem.) Also I thought about saving it to the database but than when someone cancels a room, for others, it wont be visible.
Do you know any solution how to do this?