@slugbugblue/trax 1.0.0 → 1.1.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 +8 -0
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/docs/engine.md +4 -2
- package/package.json +7 -4
- package/src/engine.js +6 -1
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright ©
|
|
189
|
+
Copyright © 2019-2026 Chad Transtrum
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Trax][gnutrax] for over two decades, and has a lot of expertise in this area.
|
|
|
71
71
|
|
|
72
72
|
## License
|
|
73
73
|
|
|
74
|
-
Copyright 2019-
|
|
74
|
+
Copyright 2019-2026 Chad Transtrum
|
|
75
75
|
|
|
76
76
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
77
77
|
the files in this project except in compliance with the License. You may obtain
|
package/docs/engine.md
CHANGED
|
@@ -39,6 +39,9 @@ class properties and methods:
|
|
|
39
39
|
|
|
40
40
|
- `Trax.names`: an object of variant rule set names to English names.
|
|
41
41
|
|
|
42
|
+
- `Trax.version`: a string representing the semver-compliant version of the
|
|
43
|
+
engine.
|
|
44
|
+
|
|
42
45
|
- `Trax.point(x, y)`: quick access to the [Point class][point-docs], for
|
|
43
46
|
two-dimensional locations used internally by the Trax engine and which are
|
|
44
47
|
required for some of the lower-level engine functions. Operates as a
|
|
@@ -75,7 +78,6 @@ trax = new Trax(rules, moves, id)
|
|
|
75
78
|
that if an array is used, each item in the array should be a notation string.
|
|
76
79
|
If a string is used instead, it is permissible to include the move numbers of
|
|
77
80
|
each move as well. As an example, the following are equivalent:
|
|
78
|
-
|
|
79
81
|
- `['@0/', '@1+', 'B0\\']`
|
|
80
82
|
- `'1. @0/ 2. @1+ 3. B0\\'`
|
|
81
83
|
- `@0/ @1+ b0\\`
|
|
@@ -414,7 +416,7 @@ tie.
|
|
|
414
416
|
|
|
415
417
|
## License
|
|
416
418
|
|
|
417
|
-
Copyright 2019-
|
|
419
|
+
Copyright 2019-2026 Chad Transtrum
|
|
418
420
|
|
|
419
421
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
420
422
|
the files in this project except in compliance with the License. You may obtain
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slugbugblue/trax",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Trax game engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"trax",
|
|
@@ -17,15 +17,18 @@
|
|
|
17
17
|
"./version": "./src/version.js",
|
|
18
18
|
"./version.js": "./src/version.js"
|
|
19
19
|
},
|
|
20
|
-
"repository":
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://gitlab.com/slugbugblue/trax.git"
|
|
23
|
+
},
|
|
21
24
|
"scripts": {
|
|
22
25
|
"genversion": "genversion --esm src/version.js",
|
|
23
26
|
"git-add": "git add src/version.js",
|
|
24
27
|
"test": "xo && c8 ava",
|
|
25
|
-
"prepare": "husky",
|
|
28
|
+
"prepare": "[ -n \"$CI\" ] || husky",
|
|
26
29
|
"preversion": "npm test",
|
|
27
30
|
"version": "npm run genversion ; npm run git-add",
|
|
28
|
-
"postversion": "git push && git push --tags
|
|
31
|
+
"postversion": "git push && git push --tags"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|
|
31
34
|
"@slugbugblue/lru": "^1.0.0",
|
package/src/engine.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/** Trax engine.
|
|
2
|
-
* @copyright 2019-
|
|
2
|
+
* @copyright 2019-2026
|
|
3
3
|
* @author Chad Transtrum <chad@transtrum.net>
|
|
4
4
|
* @license Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/// <reference path="./types.d.ts" />
|
|
8
|
+
|
|
7
9
|
import { Point } from '@slugbugblue/point'
|
|
10
|
+
import { version } from './version.js'
|
|
8
11
|
|
|
9
12
|
// Fun trax helper constants
|
|
10
13
|
|
|
@@ -116,6 +119,8 @@ const codeRowLength = (row) =>
|
|
|
116
119
|
/** A digital representation of a Trax game. */
|
|
117
120
|
export class Trax {
|
|
118
121
|
// Static class properties
|
|
122
|
+
/** @readonly */
|
|
123
|
+
static version = version
|
|
119
124
|
/** @readonly @type {Record<TraxVariant, string>} */
|
|
120
125
|
static names = {
|
|
121
126
|
trax: 'Trax',
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '1.
|
|
2
|
+
export const version = '1.1.0'
|