You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+97-1Lines changed: 97 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ gungi.js is a TypeScript gungi library for the strategy game from the HUNTER×HU
8
8
Credit to these two reddit posts from [u/magickirua](https://www.reddit.com/r/HunterXHunter/comments/uqrtct/gungi_the_official_rules) and [u/MythicalTenshi](https://www.reddit.com/r/HunterXHunter/comments/105f43g/comment/j3evkkq)
9
9
which translate the rule book.
10
10
11
-
gungi.js is used for move generation/validation, piece placement/movement, and endgame detection - basically everything but the AI.
11
+
gungi.js is used for move generation/validation, piece placement/movement, piece ID tracking, and endgame detection - basically everything but the AI.
Returns the top piece of the tower on the square. Returns `undefined` if the square is empty.
@@ -312,6 +325,89 @@ gungi.get('7-3');
312
325
// -> undefined
313
326
```
314
327
328
+
### .getHandPieceId(type, color, index)
329
+
330
+
Returns the ID of a specific hand piece by type, color, and index. Useful for selecting which specific piece to play when multiple pieces of the same type are in hand.
0 commit comments