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 10k rounds reached combat error. #12564

Merged
merged 1 commit into from
May 4, 2024
Merged

Conversation

asvitkine
Copy link
Contributor

This would happen when edit mode was left on when switching to an AI player. This changes makes such transitions turn off edit mode as well as making all battle simulations ignore edit mode.

FIxes: #12488

Notes to Reviewer

This would happen when edit mode was left on when switching to an AI player.
This changes makes such transitions turn off edit mode as well as making all battle simulations ignore edit mode.
@DanVanAtta
Copy link
Member

This update is a good step forward. Thank you @asvitkine for tracking it down.

This fix makes me think about the case when someone turns on edit mode during combat with AI. There likely is another fix needed somewhere to resolve that type of issue (though, if that fix would be just too gnarly or not, I do not know)

@asvitkine
Copy link
Contributor Author

This update is a good step forward. Thank you @asvitkine for tracking it down.

This fix makes me think about the case when someone turns on edit mode during combat with AI. There likely is another fix needed somewhere to resolve that type of issue (though, if that fix would be just too gnarly or not, I do not know)

I did check that and it's currently not possible to turn on edit mode outside of your own turn.

@asvitkine asvitkine merged commit 565f203 into triplea-game:master May 4, 2024
1 check passed
@Cernelius
Copy link
Contributor

Wouldn't it make sense that every AI player automatically turns Edit Mode off if it is on when taking over? Meaning that Edit Mode is set to off whenever the control passes to an AI player?

I actually don't even know what happens when the AI is playing with Edit Mode on, but I assume that the AI does not take advantage of it. I have no idea if there is any user-case for letting Edit Mode on while the AI plays.

@asvitkine
Copy link
Contributor Author

@Cernelius that's what my change does.

@Cernelius
Copy link
Contributor

Oh ok.

@Cernelius
Copy link
Contributor

Also for Does Nothing AI?

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

Successfully merging this pull request may close these issues.

ConcurrentBattleCalculator#calculate:200 - java.lang.IllegalStateException
3 participants