kflorence / beaming

Beaming is a free, open source puzzle game that involves directing beams through a hexagonal grid.
https://kflorence.github.io/beaming/
Other
1 stars 0 forks source link

Use UUIDv4 for item IDs to prevent collisions #23

Closed kflorence closed 3 months ago

kflorence commented 3 months ago

The previous solution of using an incrementing integer would result in collisions between items stored in state and beams, since beam IDs are generated on the fly and not stored in state, and the unique ID was only incremented when the ID was not stored in state. This makes item IDs a little harder to read, but ensure they remain unique across all items.