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

Various minor improvements #9218

Merged
merged 11 commits into from
Oct 24, 2024
Merged

Conversation

oleg-derevenetz
Copy link
Collaborator

@oleg-derevenetz oleg-derevenetz commented Oct 19, 2024

This PR:

  • Rewrites the Rand::Queue logic. The previous logic was weird and did many nonsense, there is a way to do the same much easier and without rewriting the contents of the queue (the whole process can be const);
  • Simplifies the BagArtifacts::exchangeArtifacts(). Instead of passing bags and heroes separately, this method has been turned into static and accepts only exchanging heroes. Also a long-standing TODO regarding saving a slot for a spellbook has been implemented;
  • Performs a minor modernization of the code related to Army and Troop.

@oleg-derevenetz oleg-derevenetz added improvement New feature, request or improvement logic Things related to game logic labels Oct 19, 2024
@oleg-derevenetz oleg-derevenetz added this to the 1.1.3 milestone Oct 19, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

src/fheroes2/army/army_troop.cpp Show resolved Hide resolved
src/fheroes2/army/army_troop.cpp Show resolved Hide resolved
@ihhub ihhub modified the milestones: 1.1.3, 1.1.4 Oct 21, 2024
@oleg-derevenetz oleg-derevenetz marked this pull request as ready for review October 23, 2024 10:18
@ihhub ihhub merged commit 082d3be into ihhub:master Oct 24, 2024
20 checks passed
@ihhub
Copy link
Owner

ihhub commented Oct 24, 2024

@oleg-derevenetz , huge thanks for these improvements!

@oleg-derevenetz oleg-derevenetz deleted the various-improvements branch October 24, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature, request or improvement logic Things related to game logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants