KeeganW / ti4

TI4 Map Generator - Generate a custom, unique, and balanced Twilight Imperium 4 galaxy map to use in your next game!
https://keeganw.github.io/ti4/
24 stars 19 forks source link

Feature: Map Rotation #114

Closed itho closed 8 months ago

itho commented 8 months ago

I found myself wanting to rotate a map today to share ahead of a game, and figured it might be fun to add the functionality to the site! Thanks for making this open-sourced!

I know there are some more dynamic ways to rotate the arrays, but with a maximum of 4 rings that I could see, I didn't think it was worth the added complexity and brain power. 😅

I did have a quick look through the rest of the source, and I'm hoping I haven't missed anything (e.g., URL updates, etc.). Currently, the player positions/names don't rotate with the board, but I'm sure that wouldn't be too much effort to add if that was preferred.

Edit: I did have to do some npm audit fix'ing to get the repo working on my local machine, but I haven't committed any of these updates.

itho commented 8 months ago

I've just realised that this does not play nicely with hyperlanes, which would need rotating to maintain the correct connections.

KeeganW commented 8 months ago

Thanks @itho ! I added some tooltips, but otherwise looks good! I agree, could do something fancy with rotating tiles dynamically, but its probably not worth the headache, just like it wasn't worth it for the original map building 😅

Thank you for your contribution!

KeeganW commented 8 months ago

Just deployed, should be visible on the main site. Thanks again @itho!

itho commented 8 months ago

You're welcome, thank you for the site!