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

Fix: Error 409 When Starting Battle using Rest Memory Variant #65

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

riandyrn
Copy link
Collaborator

@riandyrn riandyrn commented Jul 17, 2024

When I run the system using make run command & start a new game, it prevents me from starting a battle like this:

Screenshot 2024-07-18 at 07 02 32

Yet, the scenario status is correct, which is BATTLE_1:

Screenshot 2024-07-18 at 07 03 15

Upon investigation, I found that the current implementation of GetBattle() in memory battle storage is not returning nil but an empty object when the service interface expects it to return nil. So, I fix this in this PR.

I also noticed the GetGame() implementation in memory game storage is in the same situation, so I fixed it in this PR.

@riandyrn riandyrn added the bug Something isn't working label Jul 17, 2024
…if game is not exists GetGame() will return nil;
@riandyrn riandyrn marked this pull request as ready for review July 18, 2024 00:19
@riandyrn riandyrn merged commit 25ca900 into master Jul 18, 2024
2 checks passed
@riandyrn riandyrn deleted the fix/error-409-start-battle-memory branch July 18, 2024 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant