Hi,
I don't know if your problem comes from the fact that you connect and disconnect your cards, but if it does: (can be useful for other devs, too)
paramesis wrote: ↑23 July 2020, 03:07
If for whatever reason you need to add listeners dynamically, dojo.connect creates an object that you would need to store so that you can use dojo.disconnect.
BGA implemented a this.connect() method that automatically stores the connection handler for you, so you don't need to store it yourself. Then you must use this.disconnect() to disconnect it. But I remember I found it had limitations (can't remember which ones, maybe the only thing is that it's less convenient than chaining dojo.query() and connect()). Not sure it's in the doc, so if you want to use this, you'll have to look into BGA's javascript or ask here (it doesn't have exactly the same arguments as dojo.connect). I used this a long time ago, so I hope I'm not saying incorrect things.
But to avoid troubles with connecting and disconnecting (and risking to connect twice by error), you can also consider connecting cards only once and for the whole game, to a method that will do something or not, depending on the context. This is my preferred way to deal with connections.