Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are card abilities tested? #114

Open
fabianTMC opened this issue Dec 30, 2022 · 2 comments
Open

How are card abilities tested? #114

fabianTMC opened this issue Dec 30, 2022 · 2 comments

Comments

@fabianTMC
Copy link
Contributor

Is there a way we can add automated tests? That might help with testing cards and their abilities as they get more complex.

@sindreslungaard
Copy link
Owner

It would be difficult as all cards interact with each other differently, but yeah it would be nice if we had a framework for testing as much as possible. Just don't think it's worth investing the limited time and resources we have into that rather than spending it on adding as many new cards as possible.

What I think would be a nice quick win in regards to testing is to make it easier to manually test cards as you're developing them. Currently whenever you make a change you have to create a new match with two accounts and start adding mana to summon your card etc in order to test it. Would be neat if we could restore the state of a match immediately between application restarts.

@fabianTMC
Copy link
Contributor Author

Please correct me if I am wrong.

I took a look at the code and currently, everything about a match is just broadcast to the players and the spectators. Nothing about the duel is stored in mongo. To restore the state of a match, we would need to store all the actions the players take and then restore it with the corresponding duel id when the server restarts.

Is this what you are suggesting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants