@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.
- package/CHANGELOG.md +34 -0
- package/LICENSE +21 -0
- package/README.md +656 -2
- package/dist/board.d.ts +66 -0
- package/dist/board.js +116 -0
- package/dist/colours.d.ts +50 -0
- package/dist/colours.js +44 -0
- package/dist/computer.d.ts +78 -0
- package/dist/computer.js +201 -0
- package/dist/dice.d.ts +17 -0
- package/dist/dice.js +37 -0
- package/dist/draw-entry.d.ts +13 -0
- package/dist/draw-entry.js +10 -0
- package/dist/draw.d.ts +69 -0
- package/dist/draw.js +176 -0
- package/dist/element-define.d.ts +1 -0
- package/dist/element-define.js +13 -0
- package/dist/element.d.ts +56 -0
- package/dist/element.js +174 -0
- package/dist/evaluate.d.ts +54 -0
- package/dist/evaluate.js +188 -0
- package/dist/game.d.ts +155 -0
- package/dist/game.js +304 -0
- package/dist/geometry.d.ts +104 -0
- package/dist/geometry.js +117 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +16 -0
- package/dist/match.d.ts +32 -0
- package/dist/match.js +33 -0
- package/dist/mount.d.ts +144 -0
- package/dist/mount.js +701 -0
- package/dist/moves.d.ts +28 -0
- package/dist/moves.js +83 -0
- package/dist/notation.d.ts +37 -0
- package/dist/notation.js +178 -0
- package/dist/play-entry.d.ts +13 -0
- package/dist/play-entry.js +10 -0
- package/dist/playStyle.d.ts +13 -0
- package/dist/playStyle.js +40 -0
- package/dist/plays.d.ts +39 -0
- package/dist/plays.js +144 -0
- package/dist/positionId.d.ts +11 -0
- package/dist/positionId.js +114 -0
- package/dist/random.d.ts +6 -0
- package/dist/random.js +22 -0
- package/dist/record.d.ts +104 -0
- package/dist/record.js +310 -0
- package/dist/rules.d.ts +59 -0
- package/dist/rules.js +77 -0
- package/dist/side.d.ts +13 -0
- package/dist/side.js +10 -0
- package/dist/sound.d.ts +20 -0
- package/dist/sound.js +47 -0
- package/dist/strings.d.ts +15 -0
- package/dist/strings.js +130 -0
- package/dist/style.d.ts +12 -0
- package/dist/style.js +67 -0
- package/dist/variants.d.ts +60 -0
- package/dist/variants.js +77 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/package.json +102 -4
- package/sounds/CREDITS.txt +14 -0
- package/sounds/clack.wav +0 -0
- package/sounds/cube.wav +0 -0
- package/sounds/dice.wav +0 -0
- 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.
|