chess4js 1.0.0-beta.9c → 1.0.0-beta.9d
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 +5 -4
- package/chess4js.d.mts +2 -1
- package/chess4js.mjs +1805 -1787
- package/chess4js.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +12 -12
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -424,13 +424,14 @@ factory.
|
|
|
424
424
|
| `white` | `Nullable<Player>` | The white player. |
|
|
425
425
|
| `black` | `Nullable<Player>` | The black player. |
|
|
426
426
|
| `outcome` | `string` | The outcome of the match, can be "1-0", "0-1", "1/2-1/2", "in game" or "suspended" |
|
|
427
|
-
| `id` | `Nullable<string>` |
|
|
427
|
+
| `id` | `Nullable<string>` | A unique id for the match |
|
|
428
|
+
| `round` | `Nullable<number>` | The round number (0-based) for the match or null if not applicable |
|
|
428
429
|
|
|
429
430
|
#### Factories
|
|
430
431
|
|
|
431
|
-
| Function | Arguments
|
|
432
|
-
|
|
433
|
-
| `matchOf` | `white`: `Player`, `black`: `Player`, `impactFactor`: `number` default `32`, `rangeFactor`: `number` default `400`, `logisticBase`: `number` default `10` | `Match` | Creates a match between two players with the given elo calculation parameters or with default values. |
|
|
432
|
+
| Function | Arguments | Return type | Description |
|
|
433
|
+
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------|
|
|
434
|
+
| `matchOf` | `white`: `Player`, `black`: `Player`, `impactFactor`: `number` default `32`, `rangeFactor`: `number` default `400`, `logisticBase`: `number` default `10`, `id`: `Nullable<string>` default `null`, `round`: `Nullable<number>` default `null` | `Match` | Creates a match between two players with the given elo calculation parameters or with default values. |
|
|
434
435
|
|
|
435
436
|
#### Example
|
|
436
437
|
|
package/chess4js.d.mts
CHANGED
|
@@ -86,6 +86,7 @@ export declare class Match {
|
|
|
86
86
|
get outcome(): string;
|
|
87
87
|
set outcome(value: string);
|
|
88
88
|
get id(): Nullable<string>;
|
|
89
|
+
get round(): Nullable<number>;
|
|
89
90
|
toString(): string;
|
|
90
91
|
}
|
|
91
92
|
/** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
|
|
@@ -442,6 +443,6 @@ export declare function customGame(gameMode: string, threeRepetitionsMode: strin
|
|
|
442
443
|
export declare function parseGames(pgnInput: string, idSupplier?: () => Nullable<any>): ReadonlyArray<Game>;
|
|
443
444
|
export declare function scoreOf(score: string): Score;
|
|
444
445
|
export declare function playerOf(name: string, initialElo: number): Player;
|
|
445
|
-
export declare function matchOf(white: Player, black: Player, impactFactor?: number, rangeFactor?: number, logisticBase?: number, id?: Nullable<string>): Match;
|
|
446
|
+
export declare function matchOf(white: Player, black: Player, impactFactor?: number, rangeFactor?: number, logisticBase?: number, id?: Nullable<string>, round?: Nullable<number>): Match;
|
|
446
447
|
export declare function tournament(type: string, tiebreakers?: Array<string>, impactFactor?: number, rangeFactor?: number, logisticBase?: number, idGenerator?: Nullable<() => string>, id?: Nullable<string>, name?: Nullable<string>, timeControl?: Nullable<string>, timeControlType?: Nullable<string>): Tournament;
|
|
447
448
|
export declare function visibleSquares(piece: string, square: string, position: Position): Bitboard;
|