chess4js 1.0.0-beta.9g → 1.0.0-beta.9h

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/chess4js.d.mts CHANGED
@@ -380,6 +380,14 @@ export declare namespace Square {
380
380
  }
381
381
  }
382
382
  }
383
+ export declare class Tiebreaker {
384
+ private constructor();
385
+ getValue(player: Player): Score;
386
+ }
387
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
388
+ export declare namespace Tiebreaker.$metadata$ {
389
+ const constructor: abstract new () => Tiebreaker;
390
+ }
383
391
  export declare class Tournament {
384
392
  private constructor();
385
393
  get impactFactor(): number;
@@ -445,4 +453,5 @@ export declare function scoreOf(score: string): Score;
445
453
  export declare function playerOf(name: string, initialElo: number): Player;
446
454
  export declare function matchOf(white: Player, black: Player, impactFactor?: number, rangeFactor?: number, logisticBase?: number, id?: Nullable<any>, round?: Nullable<number>): Match;
447
455
  export declare function tournament(type: string, tiebreakers?: Array<string>, impactFactor?: number, rangeFactor?: number, logisticBase?: number, idGenerator?: Nullable<() => any>, id?: Nullable<string>, name?: Nullable<string>, timeControl?: Nullable<string>, timeControlType?: Nullable<string>): Tournament;
456
+ export declare function tiebreakerOf(name: string): Tiebreaker;
448
457
  export declare function visibleSquares(piece: string, square: string, position: Position): Bitboard;
package/chess4js.mjs CHANGED
@@ -4565,46 +4565,57 @@ class Square_0 {
4565
4565
  return getRow(this.ordinal);
4566
4566
  }
4567
4567
  }
4568
+ class Tiebreaker_0 {
4569
+ constructor(backedTiebreaker) {
4570
+ this.f12_1 = backedTiebreaker;
4571
+ }
4572
+ g12() {
4573
+ return this.f12_1;
4574
+ }
4575
+ getValue(player) {
4576
+ return new Score_0(this.f12_1.ty(player.t10_1));
4577
+ }
4578
+ }
4568
4579
  class Tournament {
4569
4580
  constructor(backedTournament) {
4570
- this.f12_1 = backedTournament;
4581
+ this.h12_1 = backedTournament;
4571
4582
  var tmp = this;
4572
4583
  // Inline function 'kotlin.arrayOf' call
4573
4584
  // Inline function 'kotlin.js.unsafeCast' call
4574
4585
  // Inline function 'kotlin.js.asDynamic' call
4575
- tmp.g12_1 = ['fidePerformance', 'buchholz', 'progressive', 'sonnebornBerger'];
4576
- }
4577
- h12() {
4578
- return this.f12_1;
4579
- }
4580
- i12(value) {
4581
- this.f12_1.kn().om_1 = value;
4586
+ tmp.i12_1 = ['fidePerformance', 'buchholz', 'progressive', 'sonnebornBerger'];
4582
4587
  }
4583
4588
  j12() {
4584
- return this.f12_1.kn().om_1;
4589
+ return this.h12_1;
4585
4590
  }
4586
4591
  k12(value) {
4587
- this.f12_1.kn().pm_1 = value;
4592
+ this.h12_1.kn().om_1 = value;
4588
4593
  }
4589
4594
  l12() {
4590
- return this.f12_1.kn().pm_1;
4595
+ return this.h12_1.kn().om_1;
4591
4596
  }
4592
4597
  m12(value) {
4593
- this.f12_1.kn().qm_1 = value;
4598
+ this.h12_1.kn().pm_1 = value;
4594
4599
  }
4595
4600
  n12() {
4596
- return this.f12_1.kn().qm_1;
4601
+ return this.h12_1.kn().pm_1;
4597
4602
  }
4598
4603
  o12(value) {
4599
- this.f12_1.rn(tiebreakerComparatorOf(value.slice()));
4600
- this.g12_1 = value;
4604
+ this.h12_1.kn().qm_1 = value;
4601
4605
  }
4602
4606
  p12() {
4603
- return this.g12_1;
4607
+ return this.h12_1.kn().qm_1;
4608
+ }
4609
+ q12(value) {
4610
+ this.h12_1.rn(tiebreakerComparatorOf(value.slice()));
4611
+ this.i12_1 = value;
4612
+ }
4613
+ r12() {
4614
+ return this.i12_1;
4604
4615
  }
4605
4616
  ao() {
4606
4617
  // Inline function 'kotlin.collections.map' call
4607
- var this_0 = this.f12_1.ao();
4618
+ var this_0 = this.h12_1.ao();
4608
4619
  // Inline function 'kotlin.collections.mapTo' call
4609
4620
  var destination = ArrayList.i1(collectionSizeOrDefault(this_0, 10));
4610
4621
  var _iterator__ex2g4s = this_0.x();
@@ -4616,26 +4627,26 @@ class Tournament {
4616
4627
  return destination.j2();
4617
4628
  }
4618
4629
  sn(value) {
4619
- this.f12_1.sn(value);
4630
+ this.h12_1.sn(value);
4620
4631
  }
4621
4632
  tn() {
4622
- return this.f12_1.tn();
4633
+ return this.h12_1.tn();
4623
4634
  }
4624
4635
  dn() {
4625
- return this.f12_1.dn();
4636
+ return this.h12_1.dn();
4626
4637
  }
4627
4638
  mn() {
4628
- return this.f12_1.mn();
4639
+ return this.h12_1.mn();
4629
4640
  }
4630
4641
  nn() {
4631
- return this.f12_1.nn();
4642
+ return this.h12_1.nn();
4632
4643
  }
4633
4644
  on() {
4634
- return this.f12_1.on();
4645
+ return this.h12_1.on();
4635
4646
  }
4636
4647
  pn() {
4637
4648
  // Inline function 'kotlin.collections.map' call
4638
- var this_0 = this.f12_1.pn();
4649
+ var this_0 = this.h12_1.pn();
4639
4650
  // Inline function 'kotlin.collections.mapTo' call
4640
4651
  var destination = ArrayList.i1(collectionSizeOrDefault(this_0, 10));
4641
4652
  var _iterator__ex2g4s = this_0.x();
@@ -4648,7 +4659,7 @@ class Tournament {
4648
4659
  }
4649
4660
  qn() {
4650
4661
  // Inline function 'kotlin.collections.map' call
4651
- var this_0 = this.f12_1.qn();
4662
+ var this_0 = this.h12_1.qn();
4652
4663
  // Inline function 'kotlin.collections.mapTo' call
4653
4664
  var destination = ArrayList.i1(collectionSizeOrDefault(this_0, 10));
4654
4665
  var _iterator__ex2g4s = this_0.x();
@@ -4660,17 +4671,17 @@ class Tournament {
4660
4671
  return destination.j2();
4661
4672
  }
4662
4673
  ln() {
4663
- return this.f12_1.ln();
4674
+ return this.h12_1.ln();
4664
4675
  }
4665
4676
  addPlayer(player) {
4666
- return this.f12_1.un(player.t10_1);
4677
+ return this.h12_1.un(player.t10_1);
4667
4678
  }
4668
4679
  removePlayer(player) {
4669
- return this.f12_1.vn(player.t10_1);
4680
+ return this.h12_1.vn(player.t10_1);
4670
4681
  }
4671
4682
  nextRound() {
4672
4683
  // Inline function 'kotlin.collections.map' call
4673
- var this_0 = this.f12_1.wn();
4684
+ var this_0 = this.h12_1.wn();
4674
4685
  // Inline function 'kotlin.collections.mapTo' call
4675
4686
  var destination = ArrayList.i1(collectionSizeOrDefault(this_0, 10));
4676
4687
  var _iterator__ex2g4s = this_0.x();
@@ -4682,31 +4693,31 @@ class Tournament {
4682
4693
  return destination.j2();
4683
4694
  }
4684
4695
  addMatch(white, black, outcome, id, round) {
4685
- return this.f12_1.zn(white, black, outcome, id, round);
4696
+ return this.h12_1.zn(white, black, outcome, id, round);
4686
4697
  }
4687
4698
  get impactFactor() {
4688
- return this.j12();
4699
+ return this.l12();
4689
4700
  }
4690
4701
  set impactFactor(value) {
4691
- this.i12(value);
4702
+ this.k12(value);
4692
4703
  }
4693
4704
  get rangeFactor() {
4694
- return this.l12();
4705
+ return this.n12();
4695
4706
  }
4696
4707
  set rangeFactor(value) {
4697
- this.k12(value);
4708
+ this.m12(value);
4698
4709
  }
4699
4710
  get logisticBase() {
4700
- return this.n12();
4711
+ return this.p12();
4701
4712
  }
4702
4713
  set logisticBase(value) {
4703
- this.m12(value);
4714
+ this.o12(value);
4704
4715
  }
4705
4716
  get tiebreakers() {
4706
- return this.p12();
4717
+ return this.r12();
4707
4718
  }
4708
4719
  set tiebreakers(value) {
4709
- this.o12(value);
4720
+ this.q12(value);
4710
4721
  }
4711
4722
  get leaderboard() {
4712
4723
  return this.ao();
@@ -14128,9 +14139,13 @@ function tournament_0(type, tiebreakers, impactFactor, rangeFactor, logisticBase
14128
14139
  _init_properties_factory_kt__5kmpyw_0();
14129
14140
  // Inline function 'kotlin.apply' call
14130
14141
  var this_0 = new Tournament(tournament(type, new EloCalculator(impactFactor, rangeFactor, logisticBase), tiebreakerComparatorOf(tiebreakers.slice()), idGenerator, id, name, timeControl, timeControlType));
14131
- this_0.o12(tiebreakers);
14142
+ this_0.q12(tiebreakers);
14132
14143
  return this_0;
14133
14144
  }
14145
+ function tiebreakerOf_0(name) {
14146
+ _init_properties_factory_kt__5kmpyw_0();
14147
+ return new Tiebreaker_0(tiebreakerOf(name));
14148
+ }
14134
14149
  function analysisGame$lambda_0() {
14135
14150
  _init_properties_factory_kt__5kmpyw_0();
14136
14151
  return null;
@@ -14283,6 +14298,7 @@ initMetadataForCompanion(Companion_12);
14283
14298
  initMetadataForClass(Side_0, 'Side');
14284
14299
  initMetadataForCompanion(Companion_13);
14285
14300
  initMetadataForClass(Square_0, 'Square');
14301
+ initMetadataForClass(Tiebreaker_0, 'Tiebreaker');
14286
14302
  initMetadataForClass(Tournament, 'Tournament');
14287
14303
  initMetadataForCompanion(Companion_14);
14288
14304
  initMetadataForClass(Tuple_0, 'Tuple');
@@ -14479,6 +14495,7 @@ export {
14479
14495
  G8 as G8,
14480
14496
  H8 as H8,
14481
14497
  Square_0 as Square,
14498
+ Tiebreaker_0 as Tiebreaker,
14482
14499
  Tournament as Tournament,
14483
14500
  Tuple_0 as Tuple,
14484
14501
  startPos as startPos,
@@ -14492,6 +14509,7 @@ export {
14492
14509
  playerOf as playerOf,
14493
14510
  matchOf as matchOf,
14494
14511
  tournament_0 as tournament,
14512
+ tiebreakerOf_0 as tiebreakerOf,
14495
14513
  visibleSquares_1 as visibleSquares,
14496
14514
  };
14497
14515
  //endregion