@johnmorrisdotca/sugoroku 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/LICENSE +21 -0
  3. package/README.md +656 -2
  4. package/dist/board.d.ts +66 -0
  5. package/dist/board.js +116 -0
  6. package/dist/colours.d.ts +50 -0
  7. package/dist/colours.js +44 -0
  8. package/dist/computer.d.ts +78 -0
  9. package/dist/computer.js +201 -0
  10. package/dist/dice.d.ts +17 -0
  11. package/dist/dice.js +37 -0
  12. package/dist/draw-entry.d.ts +13 -0
  13. package/dist/draw-entry.js +10 -0
  14. package/dist/draw.d.ts +69 -0
  15. package/dist/draw.js +176 -0
  16. package/dist/element-define.d.ts +1 -0
  17. package/dist/element-define.js +13 -0
  18. package/dist/element.d.ts +56 -0
  19. package/dist/element.js +174 -0
  20. package/dist/evaluate.d.ts +54 -0
  21. package/dist/evaluate.js +188 -0
  22. package/dist/game.d.ts +155 -0
  23. package/dist/game.js +304 -0
  24. package/dist/geometry.d.ts +104 -0
  25. package/dist/geometry.js +117 -0
  26. package/dist/index.d.ts +18 -0
  27. package/dist/index.js +16 -0
  28. package/dist/match.d.ts +32 -0
  29. package/dist/match.js +33 -0
  30. package/dist/mount.d.ts +144 -0
  31. package/dist/mount.js +701 -0
  32. package/dist/moves.d.ts +28 -0
  33. package/dist/moves.js +83 -0
  34. package/dist/notation.d.ts +37 -0
  35. package/dist/notation.js +178 -0
  36. package/dist/play-entry.d.ts +13 -0
  37. package/dist/play-entry.js +10 -0
  38. package/dist/playStyle.d.ts +13 -0
  39. package/dist/playStyle.js +40 -0
  40. package/dist/plays.d.ts +39 -0
  41. package/dist/plays.js +144 -0
  42. package/dist/positionId.d.ts +11 -0
  43. package/dist/positionId.js +114 -0
  44. package/dist/random.d.ts +6 -0
  45. package/dist/random.js +22 -0
  46. package/dist/record.d.ts +104 -0
  47. package/dist/record.js +310 -0
  48. package/dist/rules.d.ts +59 -0
  49. package/dist/rules.js +77 -0
  50. package/dist/side.d.ts +13 -0
  51. package/dist/side.js +10 -0
  52. package/dist/sound.d.ts +20 -0
  53. package/dist/sound.js +47 -0
  54. package/dist/strings.d.ts +15 -0
  55. package/dist/strings.js +130 -0
  56. package/dist/style.d.ts +12 -0
  57. package/dist/style.js +67 -0
  58. package/dist/variants.d.ts +60 -0
  59. package/dist/variants.js +77 -0
  60. package/dist/version.d.ts +2 -0
  61. package/dist/version.js +2 -0
  62. package/package.json +102 -4
  63. package/sounds/CREDITS.txt +14 -0
  64. package/sounds/clack.wav +0 -0
  65. package/sounds/cube.wav +0 -0
  66. package/sounds/dice.wav +0 -0
  67. package/sounds/hit.wav +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are written here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0] - 2026-10-01
10
+
11
+ The first release: Sugoroku, backgammon and its variants, with their rules, the
12
+ doubling cube and matches, games as text, a computer player and the board drawn and
13
+ played in a page, and a demo to play.
14
+
15
+ - The rules of backgammon: entry from the bar, hitting, blocks, both dice if possible
16
+ and the larger if only one, doubles four times, bearing off including the higher-number
17
+ rule; held to a brute-force search on thousands of positions of every variant.
18
+ - Seven variants as rows of settings, and the names ItsYourTurn.com and GoldToken.com
19
+ printed as presets: Backgammon, Backgammon Race, Anti-Backgammon, Nackgammon, Long
20
+ Gammon, Hypergammon and Tabula, with matches to 3, 5, 7 and 9 points. How each was read
21
+ is in `docs/VARIANTS.md`.
22
+ - The doubling cube (offer, take, drop, beaver off by default), gammon and backgammon
23
+ scoring, match play with the Crawford rule and the dead cube, the Jacoby rule for money
24
+ play, giving up and drawing.
25
+ - Games as text that replay against the rules, a seeded dice sequence, standard move
26
+ notation, positions as text, and GNU Backgammon's position ID for the standard board.
27
+ - A computer player in four strengths (`random`, `greedy`, `careful`, `strong`) with a
28
+ cube it can reason about, written for this package.
29
+ - The board drawn as SVG, lying down or standing up, with the checkers, dice and cube,
30
+ named boards and checkers, any colours, light and dark, and numbers on the points;
31
+ played by touch and mouse as a function or a `<sugoroku-board>` tag, with undo, the cube
32
+ and either side the computer's, in English and Japanese, with optional sounds from
33
+ Kenney's CC0 Casino Audio pack.
34
+ - A demo with a variant chooser, match length, computer strength and every look.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 John Morris
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.