* Initial refactor
* Moved checking if a tile has an enemy to a new method
* Rewrote getDistanceToEnemyUnit
* changed the position of the logic of checking if the enemy is still there
* Changed some of the other methods to use the ThreatManager getClosestEnemy()
* Added a new getTilesWithEnemyUnitsInDistance method
* Added a new getEnemyMilitaryUnitsInDistance method
* Converted a few lines to use ThreatManager
* Changed Air units to use threat manager
* Fixed tileWithEnemy error
* distanceToClosestEnemyTiles now clears at the start of every turn
* Added blank lines to end of ThreatManager.kt
* Renamed tilesInRange to tilesWithEnemyUnitsInRange
* Changed ArrayList return to a MutableList
* Removed ClosestEnemyTileData being a data class
* Improved commenting
* Improved commenting2
* getEnemyMilitaryUnitsInDistance now uses a flatMap and moved getDangerousTiles to threat manager
* Created a new helper method getEnemyUnitsOnTiles
* Renamed clearThreatData to clear
* Added shortcut if maxDist is less than or equal to distanceSearched
* Fixed distanceWithNoEnemies in getTilesWithEnemyUnitsInDistance
* Fixed notFoundDistance being higher than maxDistance when takeLargerValues is false
* Added some ThreatManager tests
* Added some more ThreatManager tests
* Removed visible map after use
* getTilesWithEnemyUnitsInDistance doesn't search distances <= tileData.distanceSearched (previously was <)
* Added 3 more tests
---------
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* UncivGame is a pure class file again, GUI split off
* Purify GameSettings step 1 - non-multiplayer nested classes
* Purify GameSettings step 2 - multiplayer nested classes
* Purify GameParameters - BaseRuleset to own file
* Rework WindowState to centralize minimum/maximum treatment
* Rename MultiplayerTurnNotifierDesktop to UncivWindowListener
* Clarifications on what the WindowListener actually does (and now the attention-getting does something on non-Windows too)
* Fix font "symbols" not showing
* Move Fonts.kt to sub-package
* Re-sort imports
* Move top-level constants to prepare split
* Split Fonts.kt each existing class to its own file
* Split off FontRulesetIcons
* Linting and comments
* Try to respect actual font layout, so fontSizeMultiplier works for ruleset icons too
* Replace font-based nation symbol in top bar with statically sized actor
* Reuse getReadonlyPixmap in extractPixmapFromTextureRegion
* Tweak topbar selected civ vertical align to be more pleasing to the human eye
* FasterUIDevelopment missing implementation of FontMetricsCommon
* Address hardcoded pixel coordinates comment
* Readability and comment cleanup
* More readability changes
* Test Free Buildings
* Flip the order of logging free buildings to avoid loops with stat buildings
* unprivate constructionComplete for the notification and add validating the queue to addBuilding
* reimplement #10142
* Switch free buildings in cityFilter to also use constructionComplete for consistency
* ✨ add testing helper function to create the barbarian civilization
* add tests for Battle class
* add more tests for Battle class
* ♻️ let compiler infer types
* add helper test methods to create unit with uniques
* use unit with unique explicitly created to loose tests from specific ruleset
* add even more tests for Battle
* ♻️ merge together two branches executing same code
* ♻️ swap if-else chain with when to improve readability
* ⚡️ swap conditions to first check the lighter computationally-wise
* ♻️ extract method to increase readability
* 💚 add some tests for TargetHelper
* 💡 add comment explaining how Unciv grid system works using a graphical example
* 💚 add other tests
* ♻️ change method name to better reflect what it does
* 🐛 fix import after rebase
* 🔥 remove parameter when value is the default and use static field for Vector2(0f, 0f)
* ♻️ split setTileTerrainAndFeatures in two different methods
* ♻️ update older tests to use the new functions
* 💡 add some comments providing examples
* ♻ refactor getGeneralModifiers to increase readability
* ♻ refactor getAttackModifiers to increase readability
* 🏗 move constants expressed as magic number to separated class to increase maintainability and expressivity
* ♻ invert condition to remove continue statement and simplify code
* 💚 add some tests for battle damage class
* address unnecessary ruleset checks
* Add missing imports
* Fix units not getting the ability uses set if it the city has your own religion
* Remove unnecessary cityConstructions check
* Remove more cases of unnecessary ruleset checks
* Additional unit tests
* Missing import
* Changing stuff solely to avoid an import
* Example of the test, in different orders
* New PromotionTree test
* Add functions to make PromotionTree easier to work with
* Changing values to be lateinit variables
* Treat remaining untyped Uniques in default rulesets, make unit test catch them
* Change untyped filtering Uniques check to Validation by inclusion in GlobalUniques instead of UniqueType.AircraftMarker
* Wiki for untyped filtering Uniques
* Re-include the "Who knows" of Future Tech on the Tech picker
* Added tests to ensure that resources from buildings behave as expected
* More tests suggested by @SeventhM
* Caught an edge case - if you pillage your own tile improvement, your resources would not have updated!
* Actually every time an improvement changes you could have a resource change
* Update resources eon every improvement change because they could be providing resources via uniques