chess4js 1.0.0-beta.3 → 1.0.0-beta.4
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/README.md +3 -40
- package/chess4js.mjs +1856 -1764
- package/chess4js.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +1400 -1455
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/
|
|
1
|
+
[](https://www.npmjs.com/package/chess4js)
|
|
2
2
|

|
|
3
3
|
|
|
4
4
|
# Chess4js
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
**Chess4js** is a JavaScript transpilation of **Chess4kt**, my Kotlin Multiplatform chess library.
|
|
9
9
|
|
|
10
10
|
This library offers nearly all the features of its Kotlin counterpart. It is currently in **beta**; while fully
|
|
11
|
-
functional, initialization performance is still being optimized.
|
|
11
|
+
functional, initialization performance is still being optimized. At present, initialization takes approximately a few
|
|
12
|
+
hundred milliseconds on modern machines.
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
@@ -200,44 +201,6 @@ The `Game` class represents a match or an analysis game.
|
|
|
200
201
|
It is basically a tree of `Node` objects with some other properties like tags.
|
|
201
202
|
If an instance is used to represent a documented match then its structure becomes like a linked list.
|
|
202
203
|
|
|
203
|
-
```mermaid
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
config:
|
|
207
|
-
theme: neo-dark
|
|
208
|
-
layout: dagre
|
|
209
|
-
look: classic
|
|
210
|
-
---
|
|
211
|
-
flowchart LR
|
|
212
|
-
subgraph subGraph0["Game Tree"]
|
|
213
|
-
B["MoveNode
|
|
214
|
-
(1. e4 - First move)"]
|
|
215
|
-
A["Node
|
|
216
|
-
(Start position of the game)"]
|
|
217
|
-
C@{ label: "Node\n (1... c5 - Black's response)" }
|
|
218
|
-
D["Node
|
|
219
|
-
(2. Nf3 - Next main move)"]
|
|
220
|
-
E["Node
|
|
221
|
-
(2. d4 - Alternative move by White)"]
|
|
222
|
-
F@{ label: "Node\n (2... cxd4 - Black's response in variation)" }
|
|
223
|
-
end
|
|
224
|
-
A -- children 0: Main line --> B
|
|
225
|
-
B -- children 0: Main line --> C
|
|
226
|
-
C -- children 0: Main line --> D
|
|
227
|
-
C -- children 1: Variation --> E
|
|
228
|
-
E -- children 0: Main line of the variation --> F
|
|
229
|
-
|
|
230
|
-
C@{ shape: rect}
|
|
231
|
-
F@{ shape: rect}
|
|
232
|
-
style B fill: #424242, stroke: #333
|
|
233
|
-
style A fill: #424242, stroke: #424242
|
|
234
|
-
style C fill: #424242, stroke: #333
|
|
235
|
-
style D fill: #424242, stroke: #333
|
|
236
|
-
style E fill: #424242, stroke: #333
|
|
237
|
-
style F fill: #424242, stroke: #333
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
|
|
241
204
|
### Properties
|
|
242
205
|
|
|
243
206
|
For the `Game` class:
|