jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
157 stars 63 forks source link

joining road/ship by placing settlement doesnt recalculate longest route #95

Closed kotc closed 2 years ago

kotc commented 3 years ago

happened during the game, got caught because longest route was going to win the game.

should be easy to replicate:

1/ make player1 have longest route 2/ player2 should build 2 shorter routes that touch in sea/land location 3/ player2 builds settlement, resulting route should be recalculated, but isnt so 4/ placing any road/ship will recalculate longest route

most likely longest route should be recalculated also at placing settlements, not only roads/ships

jdmonin commented 3 years ago

Thanks for noticing this. The Release-Testing checklist covers most longest-route changes, but missed this case.

I'm looking into it; created src/test/resources/resources/savegame/reletest-longest-joinships.game.json for a quick way to reproduce the bug.

jdmonin commented 3 years ago

Also, this was probably frustrating to encounter during your game. My apologies for that

kotc commented 3 years ago

you shouldnt be apologizing. every software has bugs, but software which has active support is the best, so thank you for keeping it alive :)

jdmonin commented 3 years ago

Thanks, I really enjoy working on it. Thanks for all your reports and suggestions to make it even better :)

kotc commented 3 years ago

yeah, i play it a lot too. few times daily, gf is hooked ;)

jdmonin commented 3 years ago

Thanks again for finding this! Tested the fix, tested regression for other longest-route conditions, added to release-testing.

This will be part of the next released version. Code is server-side, and will work with any client version which supports sea boards.

jdmonin commented 2 years ago

This fix was released as part of v2.5.00. Thanks again!