@slugbugblue/trax 0.8.0 → 0.10.1

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @slugbugblue/trax
2
2
 
3
+ ## 0.10.1 - 2022-06-12
4
+
5
+ - Added an entry point for the `Point` class at `@slugbugblue/trax/point`
6
+
7
+ ## 0.10.0 - 2022-06-12
8
+
9
+ - Added `point.in(topLoft, bottomRight)` to see if a point is inside a
10
+ rectangular bounded area
11
+ - Minor coding style changes due to updated `xo` rules
12
+
13
+ ## 0.9.0 - 2022-04-24
14
+
15
+ - Added tab-completion and completion preview code to the interactive CLI
16
+ - Restructured the CLI by moving most commands to their own file
17
+ - Changed the `view` CLI command to optionally examine previous moves
18
+
3
19
  ## 0.8.0 - 2022-04-08
4
20
 
5
21
  - Breaking change: `playMove()` now takes the _next_ move number instead of the
package/README.md CHANGED
@@ -117,11 +117,9 @@ puzzle.play('@2\\')
117
117
 
118
118
  For specifics, see the [engine.js documentation][engine-docs].
119
119
 
120
- ## Roadmap
120
+ ## Related Projects
121
121
 
122
- - Game position analysis
123
- - Bot
124
- - Puzzles
122
+ - [TraxBot][traxbot]: Game position analysis and puzzlebot
125
123
 
126
124
  ## Support
127
125
 
@@ -142,11 +140,11 @@ Thanks to his widow Colleen Foley-Smith for extending that courtesy to allow me
142
140
  to include Trax on [slugbugblue.com][sbb] as well.
143
141
 
144
142
  I would also like to extend a huge heartfelt appreciation to the magnanimous
145
- [Donald G. Bailey][dgb], who, through his excellent [book][traxbook], taught me
146
- the basics (and more!) of Trax. I found him always ready to share his insights
147
- on the mechanics of the game, as well as various approaches to encoding its
148
- complexities. His undeserved kindness and infinite patience in indulging my many
149
- questions can never be repaid.
143
+ [Donald G. Bailey][dgb], who, through his excellent book [Trax Strategy for
144
+ Beginners][traxbook], taught me the basics (and more!) of Trax. I found him
145
+ always ready to share his insights on the mechanics of the game, as well as
146
+ various approaches to encoding its complexities. His undeserved kindness and
147
+ infinite patience in indulging my many questions can never be repaid.
150
148
 
151
149
  ## License
152
150
 
@@ -165,7 +163,7 @@ specific language governing permissions and limitations under the License.
165
163
 
166
164
  ## Trax rules copyright
167
165
 
168
- In the United States, game mechanics are not eligible for coyright protection;
166
+ In the United States, game mechanics are not eligible for copyright protection;
169
167
  however, the specific wording of game rules does fall under copyright law.
170
168
 
171
169
  The official rules for Trax are found at http://traxgame.com/about_rules.php.
@@ -181,6 +179,7 @@ David Smith and heirs, and are not to be used without permission.
181
179
  [repo]: https://gitlab.com/slugbugblue/trax
182
180
  [sbb]: https://slugbugblue.com/
183
181
  [traxbook]: http://traxgame.com/shop_book.php
182
+ [traxbot]: https://gitlab.com/slugbugblue/traxbot
184
183
  [traxgame]: http://traxgame.com/
185
184
  [xdg]:
186
185
  https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
package/docs/point.md CHANGED
@@ -9,7 +9,7 @@ functionality here.
9
9
  ## Example usage
10
10
 
11
11
  ```javascript
12
- import { Point } from '@slugbugblue/trax/point.js'
12
+ import { Point } from '@slugbugblue/trax/point'
13
13
 
14
14
  const zero = new Point(0, 0)
15
15
 
@@ -85,6 +85,13 @@ Returns the distance between two points. This will never be a negative number.
85
85
  Returns `true` if the given point or point-like object is at the same location
86
86
  as the existing point.
87
87
 
88
+ ##### `in(topLeft, bottomRight)`
89
+
90
+ Pass in two points (or point-like objects) to define a rectangular bounding box.
91
+
92
+ Returns `true` if the calling point is located inside the box or along any of
93
+ its edges (ie, both bounding points are considered "inside").
94
+
88
95
  #### Plays well with others
89
96
 
90
97
  The Point class also includes functionality to provide useful default results
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slugbugblue/trax",
3
- "version": "0.8.0",
3
+ "version": "0.10.1",
4
4
  "description": "Trax game engine and friends",
5
5
  "keywords": [
6
6
  "trax",
@@ -11,7 +11,10 @@
11
11
  "bugs": "https://gitlab.com/slugbugblue/trax/issues",
12
12
  "license": "Apache-2.0",
13
13
  "author": "Chad Transtrum <chad@transtrum.net>",
14
- "exports": "./src/engine.js",
14
+ "exports": {
15
+ ".": "./src/engine.js",
16
+ "./point": "./src/point.js"
17
+ },
15
18
  "repository": "gitlab:slugbugblue/trax",
16
19
  "bin": {
17
20
  "trax": "./src/cli.js"
@@ -31,7 +34,7 @@
31
34
  "c8": "^7.11.0",
32
35
  "genversion": "^3.0.2",
33
36
  "prettier": "^2.6.1",
34
- "xo": "^0.48.0"
37
+ "xo": "0.*"
35
38
  },
36
39
  "type": "module",
37
40
  "engines": {