File tree Expand file tree Collapse file tree 3 files changed +28
-27
lines changed Expand file tree Collapse file tree 3 files changed +28
-27
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# gungi.js
2
2
3
+ ## 3.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f8f09bd: 🔧 prevent duplicate piece IDs in state transitions
8
+
9
+ Addresses race conditions in rapid ` load() ` calls where same piece
10
+ type/color could receive identical IDs, breaking game state integrity.
11
+
12
+ - ` applyCanonicalToMissingIds ` used flawed conflict detection
13
+ - Arata moves assigned same ID to both board and hand pieces
14
+ - Race conditions during rapid state transitions
15
+
16
+ Fixed core ID assignment logic with ` Set ` -based conflict tracking
17
+ rather than real-time array scanning. Balanced two requirements:
18
+
19
+ ** Stability** : Preserve IDs across close FEN states (critical for UX)
20
+ ** Uniqueness** : Ensure no duplicate IDs ever persist in system
21
+
22
+ - ` ensureUniqueIdsLenient() ` : Minimal fixes, preserves stability
23
+ - ` ensureUniqueIds() ` : Complete reassignment for canonical states
24
+ - ` checkForDuplicateIds() ` : Detection without modification
25
+
26
+ Arata moves now maintain hand piece ID stability while giving
27
+ board pieces new IDs, eliminating the duplicate scenario without
28
+ breaking expected behavior.
29
+
3
30
## 3.2.0
4
31
5
32
### Minor Changes
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " gungi.js" ,
3
- "version" : " 3.2.0 " ,
3
+ "version" : " 3.2.1 " ,
4
4
"type" : " module" ,
5
5
"description" : " library which contains all the necessary logic for the strategy game from the HUNTER×HUNTER manga" ,
6
6
"main" : " lib/gungi.js" ,
You can’t perform that action at this time.
0 commit comments