chess4js 1.0.0-beta.5 → 1.0.0-beta.7

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.mjs CHANGED
@@ -35,6 +35,8 @@ import {
35
35
  THROW_IAE23kobfj9wdoxr as THROW_IAE,
36
36
  asSequence2jzw5xbq99nu9 as asSequence_2,
37
37
  emptyList1g2z5xcrvp2zy as emptyList,
38
+ ensureNotNull1e947j3ixpazm as ensureNotNull,
39
+ IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
38
40
  initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
39
41
  UnsupportedOperationException2tkumpmhredt3 as UnsupportedOperationException,
40
42
  toString30pk9tzaqopn as toString_0,
@@ -71,7 +73,6 @@ import {
71
73
  copyOf1fl7rfmnz2fa3 as copyOf,
72
74
  convertToInty04h231mmjoh as convertToInt,
73
75
  toLongArray23ixicpzp5r3w as toLongArray,
74
- IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
75
76
  toString3o7ifthqydp6e as toString_1,
76
77
  longArray288a0fctlmjmj as longArray,
77
78
  contentEqualsc4e23leqcdd7 as contentEquals,
@@ -87,8 +88,8 @@ import {
87
88
  toList3jhuyej2anx2q as toList_0,
88
89
  countOneBits2h2gnqaw24v9c as countOneBits,
89
90
  get_sign1dnxi33u9vk0c as get_sign,
91
+ IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
90
92
  negate13xrbakfwasjy as negate,
91
- ensureNotNull1e947j3ixpazm as ensureNotNull,
92
93
  shiftRight2gqph14wydb8s as shiftRight,
93
94
  until1jbpn0z3f8lbg as until,
94
95
  addAll1k27qatfgp3k5 as addAll,
@@ -102,12 +103,12 @@ import {
102
103
  trimIndent1qytc1wvt8suh as trimIndent,
103
104
  Collection1k04j3hzsbod0 as Collection,
104
105
  isInterface3d6p8outrmvmk as isInterface,
105
- startsWith5hna0vjiqaqm as startsWith,
106
106
  hashCodeq5arwsb9dgti as hashCode,
107
107
  getc6436eumi25w as get,
108
108
  Paire9pteg33gng7 as Pair,
109
109
  titlecase36e9fbud5gg4t as titlecase,
110
110
  isLowerCase16nv9n55l9laa as isLowerCase,
111
+ startsWith5hna0vjiqaqm as startsWith,
111
112
  first3kg261hmihapu as first,
112
113
  countTrailingZeroBitszhs0313cn11e as countTrailingZeroBits_0,
113
114
  takeLowestOneBitmqr3ckwas5mk as takeLowestOneBit,
@@ -428,55 +429,94 @@ function hasChildren() {
428
429
  // Inline function 'kotlin.collections.isNotEmpty' call
429
430
  return !this.bj().c2();
430
431
  }
432
+ function toSan(language, pieces) {
433
+ if (this.rk() == null) {
434
+ return '';
435
+ }
436
+ var tmp;
437
+ switch (language) {
438
+ case 'english':
439
+ tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()));
440
+ break;
441
+ case 'spanish':
442
+ tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesSpanish());
443
+ break;
444
+ case 'dutch':
445
+ tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesDutch());
446
+ break;
447
+ case 'french':
448
+ tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesFrench());
449
+ break;
450
+ case 'german':
451
+ tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesGerman());
452
+ break;
453
+ case 'italian':
454
+ tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesItalian());
455
+ break;
456
+ default:
457
+ var tmp_0;
458
+ if (pieces == null) {
459
+ throw IllegalArgumentException.s('unknown language: ' + language + ' and pieces array is null');
460
+ } else if (!(pieces.length === 12)) {
461
+ throw IllegalArgumentException.s('unknown language: ' + language + ' and invalid pieces array');
462
+ } else {
463
+ tmp_0 = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), pieces);
464
+ }
465
+
466
+ tmp = tmp_0;
467
+ break;
468
+ }
469
+ return tmp;
470
+ }
431
471
  class RootNode {
432
472
  constructor($outer, position) {
433
- this.ll_1 = $outer;
434
- this.dl_1 = position;
435
- this.el_1 = null;
473
+ this.ml_1 = $outer;
474
+ this.el_1 = position;
475
+ this.fl_1 = null;
436
476
  var tmp = this;
437
477
  // Inline function 'kotlin.collections.mutableListOf' call
438
- tmp.fl_1 = ArrayList.h1();
439
- this.gl_1 = null;
478
+ tmp.gl_1 = ArrayList.h1();
440
479
  this.hl_1 = null;
441
480
  this.il_1 = null;
442
481
  this.jl_1 = null;
443
482
  this.kl_1 = null;
483
+ this.ll_1 = null;
444
484
  }
445
485
  uj() {
446
- return this.dl_1;
486
+ return this.el_1;
447
487
  }
448
488
  cj() {
449
- return this.el_1;
489
+ return this.fl_1;
450
490
  }
451
491
  bj() {
452
- return this.fl_1;
492
+ return this.gl_1;
453
493
  }
454
494
  dj() {
455
- return this.gl_1;
495
+ return this.hl_1;
456
496
  }
457
- ml(value) {
497
+ nl(value) {
458
498
  throw UnsupportedOperationException.da('RootNode does not accept suffix annotations.');
459
499
  }
460
500
  tk() {
461
- return this.hl_1;
501
+ return this.il_1;
462
502
  }
463
503
  uk(value) {
464
504
  throw UnsupportedOperationException.da('RootNode does not accept a parent');
465
505
  }
466
506
  aj() {
467
- return this.il_1;
507
+ return this.jl_1;
468
508
  }
469
509
  rk() {
470
- return this.jl_1;
510
+ return this.kl_1;
471
511
  }
472
512
  sk() {
473
- return this.kl_1;
513
+ return this.ll_1;
474
514
  }
475
515
  hashCode() {
476
516
  // Inline function 'kotlin.arrayOf' call
477
517
  // Inline function 'kotlin.js.unsafeCast' call
478
518
  // Inline function 'kotlin.js.asDynamic' call
479
- var tmp$ret$2 = [this.dl_1, this.el_1];
519
+ var tmp$ret$2 = [this.el_1, this.fl_1];
480
520
  return genericHashCode(tmp$ret$2);
481
521
  }
482
522
  equals(other) {
@@ -490,14 +530,14 @@ class RootNode {
490
530
  if (!(other instanceof RootNode)) {
491
531
  tmp = false;
492
532
  } else {
493
- tmp = (this.dl_1.equals(other.dl_1) && this.el_1 == other.el_1 && this.gl_1 == other.gl_1);
533
+ tmp = (this.el_1.equals(other.el_1) && this.fl_1 == other.fl_1 && this.hl_1 == other.hl_1);
494
534
  }
495
535
  }
496
536
  }
497
537
  return tmp;
498
538
  }
499
539
  toString() {
500
- var tmp0_safe_receiver = this.el_1;
540
+ var tmp0_safe_receiver = this.fl_1;
501
541
  var tmp;
502
542
  if (tmp0_safe_receiver == null) {
503
543
  tmp = null;
@@ -506,7 +546,7 @@ class RootNode {
506
546
  tmp = '{' + tmp0_safe_receiver + '}';
507
547
  }
508
548
  var tmp_0 = tmp;
509
- var tmp1_safe_receiver = this.gl_1;
549
+ var tmp1_safe_receiver = this.hl_1;
510
550
  var tmp_1;
511
551
  if (tmp1_safe_receiver == null) {
512
552
  tmp_1 = null;
@@ -517,18 +557,18 @@ class RootNode {
517
557
  return '' + tmp_0 + tmp_1;
518
558
  }
519
559
  vk(move_0, initialComment, comment, endLineComment, suffixAnnotations, notation) {
520
- if (immutable(this.ll_1)) {
521
- Companion_getInstance_1().vj_1.nl('trying to make move ' + move_0 + ' on immutable game id=' + toString_0(this.ll_1.lk_1));
560
+ if (immutable(this.ml_1)) {
561
+ Companion_getInstance_1().vj_1.ol('trying to make move ' + move_0 + ' on immutable game id=' + toString_0(this.ml_1.lk_1));
522
562
  return this;
523
563
  }
524
- if (this.fl_1.b1() === 1 && this.ll_1.dk_1.equals(GameMode_MATCH_getInstance())) {
525
- throw GameModeException.rl('Match mode cannot accept variations (RAVs); only the main line is allowed.');
564
+ if (this.gl_1.b1() === 1 && this.ml_1.dk_1.equals(GameMode_MATCH_getInstance())) {
565
+ throw GameModeException.sl('Match mode cannot accept variations (RAVs); only the main line is allowed.');
526
566
  }
527
567
  try {
528
568
  var tmp;
529
569
  switch (notation.m2_1) {
530
570
  case 1:
531
- tmp = sanToMove(this.dl_1, move_0);
571
+ tmp = sanToMove(this.el_1, move_0);
532
572
  break;
533
573
  case 0:
534
574
  tmp = moveOf_2(move_0);
@@ -538,22 +578,22 @@ class RootNode {
538
578
  break;
539
579
  }
540
580
  var m = tmp;
541
- var child = new MoveNode(this.ll_1, move(this.dl_1, m), m, initialComment, comment, endLineComment, suffixAnnotations, this);
542
- this.fl_1.k(child);
543
- if (this.fl_1.b1() === 1) {
544
- if (this.ll_1.dk_1.equals(GameMode_MATCH_getInstance())) {
545
- this.ll_1.sl();
581
+ var child = new MoveNode(this.ml_1, move(this.el_1, m), m, initialComment, comment, endLineComment, suffixAnnotations, this);
582
+ this.gl_1.k(child);
583
+ if (this.gl_1.b1() === 1) {
584
+ if (this.ml_1.dk_1.equals(GameMode_MATCH_getInstance())) {
585
+ this.ml_1.tl();
546
586
  }
547
- this.ll_1.tl(child);
548
- this.ll_1.ul(child);
549
- this.ll_1.vl(child);
550
- this.ll_1.wl(child);
587
+ this.ml_1.ul(child);
588
+ this.ml_1.vl(child);
589
+ this.ml_1.wl(child);
590
+ this.ml_1.xl(child);
551
591
  }
552
592
  return child;
553
593
  } catch ($p) {
554
594
  if ($p instanceof MoveException) {
555
595
  var e = $p;
556
- Companion_getInstance_1().vj_1.xl(e);
596
+ Companion_getInstance_1().vj_1.yl(e);
557
597
  return this;
558
598
  } else {
559
599
  throw $p;
@@ -565,12 +605,12 @@ class RootNode {
565
605
  }
566
606
  cl(parent) {
567
607
  // Inline function 'kotlin.apply' call
568
- var this_0 = new RootNode(this.ll_1, this.dl_1);
569
- this_0.el_1 = this.el_1;
570
- this_0.gl_1 = this.gl_1;
571
- this_0.ml(this.hl_1);
608
+ var this_0 = new RootNode(this.ml_1, this.el_1);
609
+ this_0.fl_1 = this.fl_1;
610
+ this_0.hl_1 = this.hl_1;
611
+ this_0.nl(this.il_1);
572
612
  // Inline function 'kotlin.collections.map' call
573
- var this_1 = this.fl_1;
613
+ var this_1 = this.gl_1;
574
614
  // Inline function 'kotlin.collections.mapTo' call
575
615
  var destination = ArrayList.l5(collectionSizeOrDefault(this_1, 10));
576
616
  var _iterator__ex2g4s = this_1.x();
@@ -579,7 +619,7 @@ class RootNode {
579
619
  var tmp$ret$0 = item.cl(this_0);
580
620
  destination.k(tmp$ret$0);
581
621
  }
582
- this_0.fl_1.b4(destination);
622
+ this_0.gl_1.b4(destination);
583
623
  return this_0;
584
624
  }
585
625
  }
@@ -653,7 +693,7 @@ class MoveNode {
653
693
  }
654
694
  vk(move_0, initialComment, comment, endLineComment, suffixAnnotations, notation) {
655
695
  if (immutable(this.vi_1)) {
656
- Companion_getInstance_1().vj_1.nl('trying to make move ' + move_0 + ' on immutable game id=' + toString_0(this.vi_1.lk_1));
696
+ Companion_getInstance_1().vj_1.ol('trying to make move ' + move_0 + ' on immutable game id=' + toString_0(this.vi_1.lk_1));
657
697
  return this;
658
698
  }
659
699
  var tmp;
@@ -664,7 +704,7 @@ class MoveNode {
664
704
  tmp = false;
665
705
  }
666
706
  if (tmp) {
667
- throw GameModeException.rl('Match mode cannot accept variations. Only the main line is allowed.');
707
+ throw GameModeException.sl('Match mode cannot accept variations. Only the main line is allowed.');
668
708
  }
669
709
  try {
670
710
  var tmp_0;
@@ -687,18 +727,18 @@ class MoveNode {
687
727
  }
688
728
  if (last(asSequence_1(this.vi_1.x())) === child) {
689
729
  if (this.vi_1.dk_1.equals(GameMode_MATCH_getInstance())) {
690
- this.vi_1.sl();
730
+ this.vi_1.tl();
691
731
  }
692
- this.vi_1.tl(child);
693
732
  this.vi_1.ul(child);
694
733
  this.vi_1.vl(child);
695
734
  this.vi_1.wl(child);
735
+ this.vi_1.xl(child);
696
736
  }
697
737
  return child;
698
738
  } catch ($p) {
699
739
  if ($p instanceof MoveException) {
700
740
  var e = $p;
701
- Companion_getInstance_1().vj_1.xl(e);
741
+ Companion_getInstance_1().vj_1.yl(e);
702
742
  return this;
703
743
  } else {
704
744
  throw $p;
@@ -752,7 +792,7 @@ class MoveNode {
752
792
  var tmp2_elvis_lhs = tmp_0;
753
793
  var tmp_1;
754
794
  if (tmp2_elvis_lhs == null) {
755
- throw Companion_getInstance_1().vj_1.xl(UnexpectedGameInternalError.zi("node parent can't be null"));
795
+ throw Companion_getInstance_1().vj_1.yl(UnexpectedGameInternalError.zi("node parent can't be null"));
756
796
  } else {
757
797
  tmp_1 = tmp2_elvis_lhs;
758
798
  }
@@ -770,23 +810,23 @@ class FiftyMovesRuleMode extends Enum {}
770
810
  class Result extends Enum {
771
811
  constructor(name, ordinal, str) {
772
812
  super(name, ordinal);
773
- this.am_1 = str;
813
+ this.bm_1 = str;
774
814
  }
775
815
  }
776
816
  class NodeIterator {
777
817
  constructor(curr) {
778
- this.bm_1 = curr;
818
+ this.cm_1 = curr;
779
819
  }
780
820
  a1() {
781
- var aux = this.bm_1;
782
- var tmp1_safe_receiver = this.bm_1;
821
+ var aux = this.cm_1;
822
+ var tmp1_safe_receiver = this.cm_1;
783
823
  var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.al();
784
824
  if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
785
825
  var tmp = this;
786
- var tmp0_safe_receiver = this.bm_1;
787
- tmp.bm_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bj().c1(0);
826
+ var tmp0_safe_receiver = this.cm_1;
827
+ tmp.cm_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bj().c1(0);
788
828
  } else {
789
- this.bm_1 = null;
829
+ this.cm_1 = null;
790
830
  }
791
831
  var tmp_0;
792
832
  if (aux == null) {
@@ -797,19 +837,19 @@ class NodeIterator {
797
837
  return tmp_0;
798
838
  }
799
839
  z() {
800
- return !(this.bm_1 == null);
840
+ return !(this.cm_1 == null);
801
841
  }
802
842
  }
803
843
  class Repetitions {
804
844
  constructor() {
805
845
  var tmp = this;
806
846
  // Inline function 'kotlin.collections.mutableMapOf' call
807
- tmp.cm_1 = LinkedHashMap.v8();
847
+ tmp.dm_1 = LinkedHashMap.v8();
808
848
  }
809
- dm(node) {
810
- var tmp0 = this.cm_1;
849
+ em(node) {
850
+ var tmp0 = this.dm_1;
811
851
  var tmp2 = node.uj();
812
- var tmp0_safe_receiver = this.cm_1.j2(node.uj());
852
+ var tmp0_safe_receiver = this.dm_1.j2(node.uj());
813
853
  var tmp;
814
854
  if (tmp0_safe_receiver == null) {
815
855
  tmp = null;
@@ -821,11 +861,11 @@ class Repetitions {
821
861
  // Inline function 'kotlin.collections.set' call
822
862
  var value = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
823
863
  tmp0.f5(tmp2, value);
824
- var tmp2_elvis_lhs = this.cm_1.j2(node.uj());
864
+ var tmp2_elvis_lhs = this.dm_1.j2(node.uj());
825
865
  return tmp2_elvis_lhs == null ? 1 : tmp2_elvis_lhs;
826
866
  }
827
- em(node) {
828
- var tmp = asSequence(this.cm_1.k2());
867
+ fm(node) {
868
+ var tmp = asSequence(this.dm_1.k2());
829
869
  var tmp0 = filter(tmp, Game$Repetitions$warning$lambda);
830
870
  var tmp$ret$5;
831
871
  $l$block: {
@@ -863,79 +903,79 @@ class UnexpectedGameInternalError extends RuntimeException {
863
903
  }
864
904
  }
865
905
  class GameModeException extends RuntimeException {
866
- static rl(msg) {
906
+ static sl(msg) {
867
907
  var $this = this.l7(msg);
868
- captureStack($this, $this.ql_1);
908
+ captureStack($this, $this.rl_1);
869
909
  return $this;
870
910
  }
871
911
  }
872
912
  class Game {
873
- fm(value) {
913
+ gm(value) {
874
914
  if (immutable(this)) {
875
915
  return Unit_instance;
876
916
  }
877
917
  this.wj_1 = value;
878
918
  }
879
- gm(value) {
919
+ hm(value) {
880
920
  if (immutable(this)) {
881
921
  return Unit_instance;
882
922
  }
883
923
  this.yj_1 = value;
884
924
  }
885
- hm(value) {
925
+ im(value) {
886
926
  if (immutable(this)) {
887
927
  return Unit_instance;
888
928
  }
889
929
  this.zj_1 = value;
890
930
  }
891
- im(value) {
931
+ jm(value) {
892
932
  if (immutable(this)) {
893
933
  return Unit_instance;
894
934
  }
895
935
  this.ak_1 = value;
896
936
  }
897
- jm(value) {
937
+ km(value) {
898
938
  if (immutable(this)) {
899
939
  return Unit_instance;
900
940
  }
901
941
  this.bk_1 = value;
902
942
  }
903
- km(value) {
943
+ lm(value) {
904
944
  if (immutable(this)) {
905
945
  return Unit_instance;
906
946
  }
907
947
  this.ck_1 = value;
908
948
  }
909
- lm(value) {
949
+ mm(value) {
910
950
  if (immutable(this)) {
911
951
  return Unit_instance;
912
952
  }
913
953
  this.ek_1 = value;
914
954
  }
915
- mm(value) {
955
+ nm(value) {
916
956
  if (immutable(this)) {
917
957
  return Unit_instance;
918
958
  }
919
959
  var tmp0 = this.xj_1;
920
- var tmp1_elvis_lhs = value == null ? null : value.am_1;
960
+ var tmp1_elvis_lhs = value == null ? null : value.bm_1;
921
961
  // Inline function 'kotlin.collections.set' call
922
962
  var value_0 = tmp1_elvis_lhs == null ? 'unknown' : tmp1_elvis_lhs;
923
963
  tmp0.f5('result', value_0);
924
964
  this.fk_1 = value;
925
965
  }
926
- nm(value) {
966
+ om(value) {
927
967
  if (immutable(this)) {
928
968
  return Unit_instance;
929
969
  }
930
970
  this.jk_1 = value;
931
971
  }
932
- om(value) {
972
+ pm(value) {
933
973
  if (immutable(this)) {
934
974
  return Unit_instance;
935
975
  }
936
976
  this.kk_1 = value;
937
977
  }
938
- static pm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, root, idSupplier) {
978
+ static qm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, root, idSupplier) {
939
979
  Companion_getInstance_1();
940
980
  root = root === VOID ? null : root;
941
981
  var tmp;
@@ -948,7 +988,7 @@ class Game {
948
988
  var $this = createThis(this);
949
989
  init_io_github_lunalobos_chess4kt_Game($this);
950
990
  if (!(root == null)) {
951
- $this.fm(root);
991
+ $this.gm(root);
952
992
  } else {
953
993
  var tmp0_safe_receiver = tags.j2('fen');
954
994
  var tmp_0;
@@ -959,7 +999,7 @@ class Game {
959
999
  tmp_0 = positionOf_0(tmp0_safe_receiver);
960
1000
  }
961
1001
  var tmp1_elvis_lhs = tmp_0;
962
- $this.fm(new RootNode($this, tmp1_elvis_lhs == null ? positionOf() : tmp1_elvis_lhs));
1002
+ $this.gm(new RootNode($this, tmp1_elvis_lhs == null ? positionOf() : tmp1_elvis_lhs));
963
1003
  }
964
1004
  $this.dk_1 = gameMode;
965
1005
  $this.gk_1 = threeRepetitionsMode;
@@ -974,7 +1014,7 @@ class Game {
974
1014
  tmp0.f5('id', value);
975
1015
  return $this;
976
1016
  }
977
- static qm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier) {
1017
+ static rm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier) {
978
1018
  Companion_getInstance_1();
979
1019
  var tmp;
980
1020
  if (idSupplier === VOID) {
@@ -994,7 +1034,7 @@ class Game {
994
1034
  tmp_0 = positionOf_0(tmp0_safe_receiver);
995
1035
  }
996
1036
  var tmp1_elvis_lhs = tmp_0;
997
- $this.fm(new RootNode($this, tmp1_elvis_lhs == null ? positionOf() : tmp1_elvis_lhs));
1037
+ $this.gm(new RootNode($this, tmp1_elvis_lhs == null ? positionOf() : tmp1_elvis_lhs));
998
1038
  $this.dk_1 = gameMode;
999
1039
  $this.gk_1 = threeRepetitionsMode;
1000
1040
  $this.hk_1 = fiftyMovesRuleMode;
@@ -1008,22 +1048,22 @@ class Game {
1008
1048
  tmp0.f5('id', value);
1009
1049
  return $this;
1010
1050
  }
1011
- tl(node) {
1012
- var count = this.ik_1.dm(node);
1051
+ ul(node) {
1052
+ var count = this.ik_1.em(node);
1013
1053
  if (this.dk_1.equals(GameMode_MATCH_getInstance()) && count === 5) {
1014
- this.hm(true);
1015
- this.om('five repetitions');
1016
- this.mm(Result_DRAW_getInstance());
1054
+ this.im(true);
1055
+ this.pm('five repetitions');
1056
+ this.nm(Result_DRAW_getInstance());
1017
1057
  }
1018
1058
  if (count === 3) {
1019
1059
  switch (this.gk_1.m2_1) {
1020
1060
  case 2:
1021
- this.gm(true);
1061
+ this.hm(true);
1022
1062
  break;
1023
1063
  case 1:
1024
- this.gm(true);
1025
- this.om('three repetitions');
1026
- this.mm(Result_DRAW_getInstance());
1064
+ this.hm(true);
1065
+ this.pm('three repetitions');
1066
+ this.nm(Result_DRAW_getInstance());
1027
1067
  break;
1028
1068
  case 0:
1029
1069
  break;
@@ -1032,15 +1072,15 @@ class Game {
1032
1072
  break;
1033
1073
  }
1034
1074
  } else {
1035
- this.gm(false);
1075
+ this.hm(false);
1036
1076
  }
1037
- if (this.ik_1.em(node)) {
1077
+ if (this.ik_1.fm(node)) {
1038
1078
  switch (this.gk_1.m2_1) {
1039
1079
  case 2:
1040
- this.im(true);
1080
+ this.jm(true);
1041
1081
  break;
1042
1082
  case 1:
1043
- this.im(true);
1083
+ this.jm(true);
1044
1084
  break;
1045
1085
  case 0:
1046
1086
  break;
@@ -1050,40 +1090,40 @@ class Game {
1050
1090
  }
1051
1091
  }
1052
1092
  }
1053
- vl(node) {
1054
- if (node.uj().rm()) {
1093
+ wl(node) {
1094
+ if (node.uj().sm()) {
1055
1095
  switch (this.hk_1.m2_1) {
1056
1096
  case 0:
1057
1097
  break;
1058
1098
  case 2:
1059
- this.jm(true);
1099
+ this.km(true);
1060
1100
  break;
1061
1101
  case 1:
1062
- this.jm(true);
1063
- this.mm(Result_DRAW_getInstance());
1102
+ this.km(true);
1103
+ this.nm(Result_DRAW_getInstance());
1064
1104
  break;
1065
1105
  default:
1066
1106
  noWhenBranchMatchedException();
1067
1107
  break;
1068
1108
  }
1069
1109
  } else {
1070
- this.jm(false);
1110
+ this.km(false);
1071
1111
  }
1072
1112
  }
1073
- wl(node) {
1113
+ xl(node) {
1074
1114
  if (node.uj().mj_1 === 75) {
1075
- this.km(true);
1076
- this.om('75 moves rule');
1077
- this.mm(Result_DRAW_getInstance());
1115
+ this.lm(true);
1116
+ this.pm('75 moves rule');
1117
+ this.nm(Result_DRAW_getInstance());
1078
1118
  }
1079
1119
  }
1080
- sl() {
1120
+ tl() {
1081
1121
  var iterator = this.x();
1082
1122
  iterator.a1();
1083
1123
  while (iterator.z()) {
1084
1124
  var node = iterator.a1();
1085
1125
  var tmp0_elvis_lhs = ecoInfo(node.uj());
1086
- this.lm(tmp0_elvis_lhs == null ? this.ek_1 : tmp0_elvis_lhs);
1126
+ this.mm(tmp0_elvis_lhs == null ? this.ek_1 : tmp0_elvis_lhs);
1087
1127
  }
1088
1128
  var tmp0 = this.xj_1;
1089
1129
  var tmp1_safe_receiver = this.ek_1;
@@ -1098,7 +1138,7 @@ class Game {
1098
1138
  var value_0 = tmp4_elvis_lhs == null ? 'unknown' : tmp4_elvis_lhs;
1099
1139
  tmp0_0.f5('opening', value_0);
1100
1140
  }
1101
- ul(node) {
1141
+ vl(node) {
1102
1142
  if (get_gameOver(node.uj())) {
1103
1143
  var tmp;
1104
1144
  if (get_draw(node.uj())) {
@@ -1108,7 +1148,7 @@ class Game {
1108
1148
  } else {
1109
1149
  tmp = Result_WHITE_WIN_getInstance();
1110
1150
  }
1111
- this.mm(tmp);
1151
+ this.nm(tmp);
1112
1152
  }
1113
1153
  }
1114
1154
  toString() {
@@ -1122,7 +1162,7 @@ class Game {
1122
1162
  sb.j8(toString(element));
1123
1163
  }
1124
1164
  var tmp0_safe_receiver = this.fk_1;
1125
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.am_1;
1165
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bm_1;
1126
1166
  var tmp_0 = sb.j8(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
1127
1167
  var tmp2_safe_receiver = this.jk_1;
1128
1168
  var tmp_1;
@@ -1149,72 +1189,72 @@ class Game {
1149
1189
  x() {
1150
1190
  return new NodeIterator(this.wj_1);
1151
1191
  }
1152
- sm(idSupplier) {
1192
+ tm(idSupplier) {
1153
1193
  // Inline function 'kotlin.collections.mutableMapOf' call
1154
1194
  // Inline function 'kotlin.apply' call
1155
1195
  var this_0 = LinkedHashMap.v8();
1156
1196
  this_0.g5(this.xj_1);
1157
1197
  // Inline function 'kotlin.apply' call
1158
- var this_1 = Game.pm(this_0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), this.wj_1.cl(null), idSupplier);
1159
- this_1.nm(this.jk_1);
1160
- this_1.om(this.kk_1);
1161
- this_1.lm(this.ek_1);
1162
- this_1.mm(this.fk_1);
1163
- this_1.gm(this.yj_1);
1164
- this_1.jm(this.bk_1);
1198
+ var this_1 = Game.qm(this_0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), this.wj_1.cl(null), idSupplier);
1199
+ this_1.om(this.jk_1);
1200
+ this_1.pm(this.kk_1);
1201
+ this_1.mm(this.ek_1);
1202
+ this_1.nm(this.fk_1);
1203
+ this_1.hm(this.yj_1);
1204
+ this_1.km(this.bk_1);
1165
1205
  return this_1;
1166
1206
  }
1167
1207
  }
1168
1208
  class KingMoves$allMovesList$delegate$lambda$slambda {
1169
1209
  constructor(this$0) {
1170
- this.tm_1 = this$0;
1210
+ this.um_1 = this$0;
1171
1211
  }
1172
- gn($this$sequence, $completion) {
1212
+ hn($this$sequence, $completion) {
1173
1213
  return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8.bind(VOID, this, $this$sequence), $completion);
1174
1214
  }
1175
1215
  w9(p1, $completion) {
1176
- return this.gn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1216
+ return this.hn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1177
1217
  }
1178
1218
  }
1179
1219
  class KingMoves {
1180
1220
  constructor(kingPiece, originSquare, enemies, regularMoves, castleMoves, regularMoveFunction) {
1181
- this.um_1 = kingPiece;
1182
- this.vm_1 = originSquare;
1183
- this.wm_1 = enemies;
1184
- this.xm_1 = regularMoves;
1185
- this.ym_1 = castleMoves;
1186
- this.zm_1 = regularMoveFunction;
1221
+ this.vm_1 = kingPiece;
1222
+ this.wm_1 = originSquare;
1223
+ this.xm_1 = enemies;
1224
+ this.ym_1 = regularMoves;
1225
+ this.zm_1 = castleMoves;
1226
+ this.an_1 = regularMoveFunction;
1187
1227
  var tmp = this;
1188
- tmp.an_1 = lazy(KingMoves$regularMovesList$delegate$lambda(this));
1228
+ tmp.bn_1 = lazy(KingMoves$regularMovesList$delegate$lambda(this));
1189
1229
  var tmp_0 = this;
1190
- tmp_0.bn_1 = lazy(KingMoves$castleMovesList$delegate$lambda(this));
1191
- this.cn_1 = this.xm_1 | this.ym_1;
1230
+ tmp_0.cn_1 = lazy(KingMoves$castleMovesList$delegate$lambda(this));
1231
+ this.dn_1 = this.ym_1 | this.zm_1;
1192
1232
  var tmp_1 = this;
1193
- tmp_1.dn_1 = lazy(KingMoves$allMovesList$delegate$lambda(this));
1233
+ tmp_1.en_1 = lazy(KingMoves$allMovesList$delegate$lambda(this));
1194
1234
  }
1195
- en() {
1196
- var tmp0 = this.an_1;
1235
+ fn() {
1236
+ var tmp0 = this.bn_1;
1197
1237
  var tmp = KProperty1;
1198
1238
  // Inline function 'kotlin.getValue' call
1199
1239
  getPropertyCallableRef('regularMovesList', 1, tmp, KingMoves$_get_regularMovesList_$ref_1r6ljl(), null);
1200
1240
  return tmp0.h2();
1201
1241
  }
1202
- fn() {
1203
- var tmp0 = this.bn_1;
1242
+ gn() {
1243
+ var tmp0 = this.cn_1;
1204
1244
  var tmp = KProperty1;
1205
1245
  // Inline function 'kotlin.getValue' call
1206
1246
  getPropertyCallableRef('castleMovesList', 1, tmp, KingMoves$_get_castleMovesList_$ref_3suu4f(), null);
1207
1247
  return tmp0.h2();
1208
1248
  }
1209
- hn() {
1210
- var tmp0 = this.dn_1;
1249
+ in() {
1250
+ var tmp0 = this.en_1;
1211
1251
  var tmp = KProperty1;
1212
1252
  // Inline function 'kotlin.getValue' call
1213
1253
  getPropertyCallableRef('allMovesList', 1, tmp, KingMoves$_get_allMovesList_$ref_go3t84(), null);
1214
1254
  return tmp0.h2();
1215
1255
  }
1216
1256
  toString() {
1217
- return 'KingMoves(piece=' + get_entries_0().c1(this.um_1).toString() + ', origin=' + get_entries_2().c1(this.vm_1).toString() + ', enemies=' + toString(toSquares(_Bitboard___init__impl__wiz5h4(this.wm_1))) + ', moves=' + toString(this.hn()) + ')';
1257
+ return 'KingMoves(piece=' + get_entries_0().c1(this.vm_1).toString() + ', origin=' + get_entries_2().c1(this.wm_1).toString() + ', enemies=' + toString(toSquares(_Bitboard___init__impl__wiz5h4(this.xm_1))) + ', moves=' + toString(this.in()) + ')';
1218
1258
  }
1219
1259
  }
1220
1260
  class Level extends Enum {}
@@ -1223,7 +1263,7 @@ class Logger {
1223
1263
  this.ii_1 = name;
1224
1264
  this.ji_1 = filterLevel;
1225
1265
  }
1226
- in(message) {
1266
+ jn(message) {
1227
1267
  var tmp0_level = Level_DEBUG_getInstance();
1228
1268
  log(this, tmp0_level, message);
1229
1269
  }
@@ -1231,50 +1271,50 @@ class Logger {
1231
1271
  var tmp0_level = Level_INFO_getInstance();
1232
1272
  log(this, tmp0_level, message);
1233
1273
  }
1234
- nl(message) {
1274
+ ol(message) {
1235
1275
  var tmp0_level = Level_WARN_getInstance();
1236
1276
  log(this, tmp0_level, message);
1237
1277
  }
1238
- jn(message) {
1278
+ kn(message) {
1239
1279
  var tmp0_level = Level_ERROR_getInstance();
1240
1280
  log(this, tmp0_level, message);
1241
1281
  }
1242
- xl(err) {
1282
+ yl(err) {
1243
1283
  var tmp0_elvis_lhs = err.message;
1244
- this.jn(tmp0_elvis_lhs == null ? 'none' : tmp0_elvis_lhs);
1284
+ this.kn(tmp0_elvis_lhs == null ? 'none' : tmp0_elvis_lhs);
1245
1285
  return err;
1246
1286
  }
1247
- kn(message) {
1287
+ ln(message) {
1248
1288
  var tmp0_level = Level_FATAL_getInstance();
1249
1289
  log(this, tmp0_level, message);
1250
1290
  }
1251
- ln(err) {
1291
+ mn(err) {
1252
1292
  var tmp0_elvis_lhs = err.message;
1253
- this.kn(tmp0_elvis_lhs == null ? 'none' : tmp0_elvis_lhs);
1293
+ this.ln(tmp0_elvis_lhs == null ? 'none' : tmp0_elvis_lhs);
1254
1294
  return err;
1255
1295
  }
1256
- mn(t1, t2) {
1296
+ nn(t1, t2) {
1257
1297
  var ms = subtract(t2.wg(), t1.wg());
1258
- this.in(this.ii_1 + ' created in ' + ms.toString() + ' ms');
1298
+ this.jn(this.ii_1 + ' created in ' + ms.toString() + ' ms');
1259
1299
  }
1260
1300
  }
1261
1301
  class Companion_2 {
1262
1302
  constructor() {
1263
1303
  Companion_instance_2 = this;
1264
- this.nn_1 = getLogger('io.github.lunalobos.chess4kt.Move');
1304
+ this.on_1 = getLogger('io.github.lunalobos.chess4kt.Move');
1265
1305
  }
1266
1306
  }
1267
1307
  class Move {
1268
- static sn(move, origin, promotionPiece) {
1308
+ static tn(move, origin, promotionPiece) {
1269
1309
  Companion_getInstance_2();
1270
1310
  promotionPiece = promotionPiece === VOID ? -1 : promotionPiece;
1271
1311
  var $this = createThis(this);
1272
1312
  init_io_github_lunalobos_chess4kt_Move($this);
1273
1313
  if (move === 0n) {
1274
- throw Companion_getInstance_2().nn_1.ln(RuntimeException.l7('Move mask cannot be zero.'));
1314
+ throw Companion_getInstance_2().on_1.mn(RuntimeException.l7('Move mask cannot be zero.'));
1275
1315
  }
1276
1316
  if (!(0 <= origin ? origin <= 63 : false)) {
1277
- throw Companion_getInstance_2().nn_1.ln(RuntimeException.l7('Origin square index must be between 0 and 63 (inclusive), but was ' + origin + '.'));
1317
+ throw Companion_getInstance_2().on_1.mn(RuntimeException.l7('Origin square index must be between 0 and 63 (inclusive), but was ' + origin + '.'));
1278
1318
  }
1279
1319
  var tmp;
1280
1320
  if (!(promotionPiece === -1)) {
@@ -1293,31 +1333,31 @@ class Move {
1293
1333
  tmp = false;
1294
1334
  }
1295
1335
  if (tmp) {
1296
- throw Companion_getInstance_2().nn_1.ln(RuntimeException.l7('Promotion piece ordinal must be -1 or a valid promotable piece ordinal, but was ' + promotionPiece + '.'));
1336
+ throw Companion_getInstance_2().on_1.mn(RuntimeException.l7('Promotion piece ordinal must be -1 or a valid promotable piece ordinal, but was ' + promotionPiece + '.'));
1297
1337
  }
1298
- $this.on_1 = move;
1299
- $this.pn_1 = origin;
1300
- $this.qn_1 = promotionPiece;
1301
- $this.rn_1 = countTrailingZeroBits(move);
1338
+ $this.pn_1 = move;
1339
+ $this.qn_1 = origin;
1340
+ $this.rn_1 = promotionPiece;
1341
+ $this.sn_1 = countTrailingZeroBits(move);
1302
1342
  return $this;
1303
1343
  }
1304
- tn() {
1305
- return Companion_instance_6.c1(this.pn_1);
1306
- }
1307
1344
  un() {
1308
- return Companion_instance_6.c1(this.rn_1);
1345
+ return Companion_instance_6.c1(this.qn_1);
1309
1346
  }
1310
1347
  vn() {
1348
+ return Companion_instance_6.c1(this.sn_1);
1349
+ }
1350
+ wn() {
1311
1351
  var tmp;
1312
- if (this.qn_1 < 0) {
1352
+ if (this.rn_1 < 0) {
1313
1353
  tmp = Piece_EMPTY_getInstance();
1314
1354
  } else {
1315
- tmp = get_entries_0().c1(this.qn_1);
1355
+ tmp = get_entries_0().c1(this.rn_1);
1316
1356
  }
1317
1357
  return tmp;
1318
1358
  }
1319
1359
  hashCode() {
1320
- return this.pn_1 | countTrailingZeroBits(this.on_1) << 6 | (this.qn_1 === -1 ? 0 : this.qn_1 << 12);
1360
+ return this.qn_1 | countTrailingZeroBits(this.pn_1) << 6 | (this.rn_1 === -1 ? 0 : this.rn_1 << 12);
1321
1361
  }
1322
1362
  equals(other) {
1323
1363
  if (other == null)
@@ -1326,32 +1366,32 @@ class Move {
1326
1366
  return true;
1327
1367
  if (!(other instanceof Move))
1328
1368
  return false;
1329
- return this.pn_1 === other.pn_1 && this.on_1 === other.on_1 && this.qn_1 === other.qn_1;
1369
+ return this.qn_1 === other.qn_1 && this.pn_1 === other.pn_1 && this.rn_1 === other.rn_1;
1330
1370
  }
1331
1371
  toString() {
1332
1372
  var sb = StringBuilder.u();
1333
1373
  // Inline function 'kotlin.text.lowercase' call
1334
1374
  // Inline function 'kotlin.js.asDynamic' call
1335
- var tmp$ret$1 = this.tn().l2_1.toLowerCase();
1375
+ var tmp$ret$1 = this.un().l2_1.toLowerCase();
1336
1376
  var tmp = sb.j8(tmp$ret$1);
1337
1377
  // Inline function 'kotlin.text.lowercase' call
1338
1378
  // Inline function 'kotlin.js.asDynamic' call
1339
- var tmp$ret$3 = this.un().l2_1.toLowerCase();
1379
+ var tmp$ret$3 = this.vn().l2_1.toLowerCase();
1340
1380
  tmp.j8(tmp$ret$3);
1341
1381
  var tmp_0;
1342
- if (this.qn_1 === -1) {
1382
+ if (this.rn_1 === -1) {
1343
1383
  tmp_0 = sb.toString();
1344
1384
  } else {
1345
1385
  // Inline function 'kotlin.text.lowercase' call
1346
1386
  // Inline function 'kotlin.js.asDynamic' call
1347
- var tmp$ret$5 = substring(this.vn().l2_1, 1).toLowerCase();
1387
+ var tmp$ret$5 = substring(this.wn().l2_1, 1).toLowerCase();
1348
1388
  tmp_0 = sb.j8(tmp$ret$5).toString();
1349
1389
  }
1350
1390
  return tmp_0;
1351
1391
  }
1352
1392
  }
1353
1393
  class MoveException extends RuntimeException {
1354
- static zn(msg) {
1394
+ static ao(msg) {
1355
1395
  var $this = this.l7(msg);
1356
1396
  init_io_github_lunalobos_chess4kt_MoveException($this);
1357
1397
  return $this;
@@ -1359,228 +1399,228 @@ class MoveException extends RuntimeException {
1359
1399
  }
1360
1400
  class MovesInfo$movesList$delegate$lambda$slambda {
1361
1401
  constructor(this$0) {
1362
- this.io_1 = this$0;
1402
+ this.jo_1 = this$0;
1363
1403
  }
1364
- gn($this$sequence, $completion) {
1404
+ hn($this$sequence, $completion) {
1365
1405
  return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_0.bind(VOID, this, $this$sequence), $completion);
1366
1406
  }
1367
1407
  w9(p1, $completion) {
1368
- return this.gn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1408
+ return this.hn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1369
1409
  }
1370
1410
  }
1371
1411
  class MovesInfo {
1372
1412
  constructor(pawnMoves, knightMoves, bishopMoves, rookMoves, queenMoves, kingMoves) {
1373
- this.ao_1 = pawnMoves;
1374
- this.bo_1 = knightMoves;
1375
- this.co_1 = bishopMoves;
1376
- this.do_1 = rookMoves;
1377
- this.eo_1 = queenMoves;
1378
- this.fo_1 = kingMoves;
1413
+ this.bo_1 = pawnMoves;
1414
+ this.co_1 = knightMoves;
1415
+ this.do_1 = bishopMoves;
1416
+ this.eo_1 = rookMoves;
1417
+ this.fo_1 = queenMoves;
1418
+ this.go_1 = kingMoves;
1379
1419
  var tmp = this;
1380
- tmp.go_1 = lazy(MovesInfo$moves$delegate$lambda(this));
1420
+ tmp.ho_1 = lazy(MovesInfo$moves$delegate$lambda(this));
1381
1421
  var tmp_0 = this;
1382
- tmp_0.ho_1 = lazy(MovesInfo$movesList$delegate$lambda(this));
1422
+ tmp_0.io_1 = lazy(MovesInfo$movesList$delegate$lambda(this));
1383
1423
  }
1384
- ep() {
1385
- var tmp0 = this.go_1;
1424
+ fp() {
1425
+ var tmp0 = this.ho_1;
1386
1426
  var tmp = KProperty1;
1387
1427
  // Inline function 'kotlin.getValue' call
1388
1428
  getPropertyCallableRef('moves', 1, tmp, MovesInfo$_get_moves_$ref_54hm5y(), null);
1389
1429
  return tmp0.h2();
1390
1430
  }
1391
- fp() {
1392
- var tmp0 = this.ho_1;
1431
+ gp() {
1432
+ var tmp0 = this.io_1;
1393
1433
  var tmp = KProperty1;
1394
1434
  // Inline function 'kotlin.getValue' call
1395
1435
  getPropertyCallableRef('movesList', 1, tmp, MovesInfo$_get_movesList_$ref_o79khg(), null);
1396
1436
  return tmp0.h2();
1397
1437
  }
1398
1438
  toString() {
1399
- return 'MovesInfo(moves = ' + toString(this.fp()) + ')';
1439
+ return 'MovesInfo(moves = ' + toString(this.gp()) + ')';
1400
1440
  }
1401
1441
  }
1402
1442
  class Notation extends Enum {}
1403
1443
  class Companion_3 {
1404
1444
  constructor() {
1405
1445
  Companion_instance_3 = this;
1406
- this.gp_1 = getLogger('io.github.lunalobos.chess4kt.Parser');
1446
+ this.hp_1 = getLogger('io.github.lunalobos.chess4kt.Parser');
1407
1447
  }
1408
1448
  }
1409
1449
  class ParserException extends RuntimeException {
1410
- static kp(msg) {
1450
+ static lp(msg) {
1411
1451
  var $this = this.l7(msg);
1412
- captureStack($this, $this.jp_1);
1452
+ captureStack($this, $this.kp_1);
1413
1453
  return $this;
1414
1454
  }
1415
1455
  }
1416
1456
  class Parser {
1417
1457
  constructor(tokens) {
1418
1458
  Companion_getInstance_3();
1419
- this.op_1 = tokens;
1459
+ this.pp_1 = tokens;
1420
1460
  var tmp = this;
1421
1461
  // Inline function 'kotlin.collections.mutableMapOf' call
1422
- tmp.qp_1 = LinkedHashMap.v8();
1423
- this.rp_1 = null;
1424
- this.sp_1 = this.op_1.x();
1462
+ tmp.rp_1 = LinkedHashMap.v8();
1463
+ this.sp_1 = null;
1464
+ this.tp_1 = this.pp_1.x();
1425
1465
  var tmp_0 = this;
1426
1466
  // Inline function 'kotlin.collections.mutableListOf' call
1427
- tmp_0.tp_1 = ArrayList.h1();
1467
+ tmp_0.up_1 = ArrayList.h1();
1428
1468
  var tmp_1 = this;
1429
1469
  var tmp_2;
1430
- if (this.sp_1.z()) {
1431
- tmp_2 = this.sp_1.a1();
1470
+ if (this.tp_1.z()) {
1471
+ tmp_2 = this.tp_1.a1();
1432
1472
  } else {
1433
- throw ParserException.kp('no tokens to parse');
1473
+ throw ParserException.lp('no tokens to parse');
1434
1474
  }
1435
- tmp_1.pp_1 = tmp_2;
1475
+ tmp_1.qp_1 = tmp_2;
1436
1476
  }
1437
- up(idSupplier) {
1477
+ vp(idSupplier) {
1438
1478
  do {
1439
1479
  parseGame(this, idSupplier);
1440
- this.pp_1 = nextTokenOrFail(this, 'error in main function ');
1480
+ this.qp_1 = nextTokenOrFail(this, 'error in main function ');
1441
1481
  }
1442
- while (!this.pp_1.lp_1.equals(TokenType_EOF_getInstance()));
1443
- return this.tp_1;
1482
+ while (!this.qp_1.mp_1.equals(TokenType_EOF_getInstance()));
1483
+ return this.up_1;
1444
1484
  }
1445
1485
  }
1446
1486
  class PawnMoves$allMovesList$delegate$lambda$slambda {
1447
1487
  constructor(this$0) {
1448
- this.vp_1 = this$0;
1488
+ this.wp_1 = this$0;
1449
1489
  }
1450
- gn($this$sequence, $completion) {
1490
+ hn($this$sequence, $completion) {
1451
1491
  return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_1.bind(VOID, this, $this$sequence), $completion);
1452
1492
  }
1453
1493
  w9(p1, $completion) {
1454
- return this.gn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1494
+ return this.hn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1455
1495
  }
1456
1496
  }
1457
1497
  class PawnMoves {
1458
1498
  constructor(pawnPiece, originSquare, enemies, regularMoves, advanceEpMoves, promotionMoves, epCapture, regularMoveFunction, promotionMoveFunction) {
1459
- this.jo_1 = pawnPiece;
1460
- this.ko_1 = originSquare;
1461
- this.lo_1 = enemies;
1462
- this.mo_1 = regularMoves;
1463
- this.no_1 = advanceEpMoves;
1464
- this.oo_1 = promotionMoves;
1465
- this.po_1 = epCapture;
1466
- this.qo_1 = regularMoveFunction;
1467
- this.ro_1 = promotionMoveFunction;
1499
+ this.ko_1 = pawnPiece;
1500
+ this.lo_1 = originSquare;
1501
+ this.mo_1 = enemies;
1502
+ this.no_1 = regularMoves;
1503
+ this.oo_1 = advanceEpMoves;
1504
+ this.po_1 = promotionMoves;
1505
+ this.qo_1 = epCapture;
1506
+ this.ro_1 = regularMoveFunction;
1507
+ this.so_1 = promotionMoveFunction;
1468
1508
  var tmp = this;
1469
- tmp.so_1 = lazy(PawnMoves$regularMovesList$delegate$lambda(this));
1509
+ tmp.to_1 = lazy(PawnMoves$regularMovesList$delegate$lambda(this));
1470
1510
  var tmp_0 = this;
1471
- tmp_0.to_1 = lazy(PawnMoves$advanceEpMovesList$delegate$lambda(this));
1511
+ tmp_0.uo_1 = lazy(PawnMoves$advanceEpMovesList$delegate$lambda(this));
1472
1512
  var tmp_1 = this;
1473
- tmp_1.uo_1 = lazy(PawnMoves$promotionMovesList$delegate$lambda(this));
1513
+ tmp_1.vo_1 = lazy(PawnMoves$promotionMovesList$delegate$lambda(this));
1474
1514
  var tmp_2 = this;
1475
- tmp_2.vo_1 = lazy(PawnMoves$epCaptureMove$delegate$lambda(this));
1476
- this.wo_1 = this.mo_1 | this.no_1 | this.oo_1 | this.po_1;
1515
+ tmp_2.wo_1 = lazy(PawnMoves$epCaptureMove$delegate$lambda(this));
1516
+ this.xo_1 = this.no_1 | this.oo_1 | this.po_1 | this.qo_1;
1477
1517
  var tmp_3 = this;
1478
- tmp_3.xo_1 = lazy(PawnMoves$allMovesList$delegate$lambda(this));
1518
+ tmp_3.yo_1 = lazy(PawnMoves$allMovesList$delegate$lambda(this));
1479
1519
  }
1480
- en() {
1481
- var tmp0 = this.so_1;
1520
+ fn() {
1521
+ var tmp0 = this.to_1;
1482
1522
  var tmp = KProperty1;
1483
1523
  // Inline function 'kotlin.getValue' call
1484
1524
  getPropertyCallableRef('regularMovesList', 1, tmp, PawnMoves$_get_regularMovesList_$ref_qve2sg(), null);
1485
1525
  return tmp0.h2();
1486
1526
  }
1487
- wp() {
1488
- var tmp0 = this.to_1;
1527
+ xp() {
1528
+ var tmp0 = this.uo_1;
1489
1529
  var tmp = KProperty1;
1490
1530
  // Inline function 'kotlin.getValue' call
1491
1531
  getPropertyCallableRef('advanceEpMovesList', 1, tmp, PawnMoves$_get_advanceEpMovesList_$ref_k5ega7(), null);
1492
1532
  return tmp0.h2();
1493
1533
  }
1494
- xp() {
1495
- var tmp0 = this.uo_1;
1534
+ yp() {
1535
+ var tmp0 = this.vo_1;
1496
1536
  var tmp = KProperty1;
1497
1537
  // Inline function 'kotlin.getValue' call
1498
1538
  getPropertyCallableRef('promotionMovesList', 1, tmp, PawnMoves$_get_promotionMovesList_$ref_pb8487(), null);
1499
1539
  return tmp0.h2();
1500
1540
  }
1501
- yp() {
1502
- var tmp0 = this.vo_1;
1541
+ zp() {
1542
+ var tmp0 = this.wo_1;
1503
1543
  var tmp = KProperty1;
1504
1544
  // Inline function 'kotlin.getValue' call
1505
1545
  getPropertyCallableRef('epCaptureMove', 1, tmp, PawnMoves$_get_epCaptureMove_$ref_4vz7gq(), null);
1506
1546
  return tmp0.h2();
1507
1547
  }
1508
- hn() {
1509
- var tmp0 = this.xo_1;
1548
+ in() {
1549
+ var tmp0 = this.yo_1;
1510
1550
  var tmp = KProperty1;
1511
1551
  // Inline function 'kotlin.getValue' call
1512
1552
  getPropertyCallableRef('allMovesList', 1, tmp, PawnMoves$_get_allMovesList_$ref_s0vg9x(), null);
1513
1553
  return tmp0.h2();
1514
1554
  }
1515
1555
  toString() {
1516
- return 'PawnMoves(piece=' + get_entries_0().c1(this.jo_1).toString() + ', origin=' + get_entries_2().c1(this.ko_1).toString() + ', enemies=' + toString(toSquares(_Bitboard___init__impl__wiz5h4(this.lo_1))) + ', moves=' + toString(this.hn()) + ')';
1556
+ return 'PawnMoves(piece=' + get_entries_0().c1(this.ko_1).toString() + ', origin=' + get_entries_2().c1(this.lo_1).toString() + ', enemies=' + toString(toSquares(_Bitboard___init__impl__wiz5h4(this.mo_1))) + ', moves=' + toString(this.in()) + ')';
1517
1557
  }
1518
1558
  }
1519
1559
  class Companion_4 {}
1520
1560
  class Piece extends Enum {
1521
1561
  constructor(name, ordinal, side) {
1522
1562
  super(name, ordinal);
1523
- this.bq_1 = side;
1563
+ this.cq_1 = side;
1524
1564
  }
1525
1565
  }
1526
1566
  class Companion_5 {
1527
1567
  constructor() {
1528
1568
  Companion_instance_5 = this;
1529
- this.cq_1 = listOf([new Char(_Char___init__impl__6a9atx(49)), new Char(_Char___init__impl__6a9atx(50)), new Char(_Char___init__impl__6a9atx(51)), new Char(_Char___init__impl__6a9atx(52)), new Char(_Char___init__impl__6a9atx(53)), new Char(_Char___init__impl__6a9atx(54)), new Char(_Char___init__impl__6a9atx(55)), new Char(_Char___init__impl__6a9atx(56))]);
1569
+ this.dq_1 = listOf([new Char(_Char___init__impl__6a9atx(49)), new Char(_Char___init__impl__6a9atx(50)), new Char(_Char___init__impl__6a9atx(51)), new Char(_Char___init__impl__6a9atx(52)), new Char(_Char___init__impl__6a9atx(53)), new Char(_Char___init__impl__6a9atx(54)), new Char(_Char___init__impl__6a9atx(55)), new Char(_Char___init__impl__6a9atx(56))]);
1530
1570
  }
1531
1571
  }
1532
1572
  class Position {
1533
- eq() {
1573
+ fq() {
1534
1574
  return copyOf(this.ej_1);
1535
1575
  }
1536
- dq() {
1537
- return get_movesInfo()(this.eq(), this.fj_1, this.hj_1, this.ij_1, this.jj_1, this.kj_1, this.gj_1);
1576
+ eq() {
1577
+ return get_movesInfo()(this.fq(), this.fj_1, this.hj_1, this.ij_1, this.jj_1, this.kj_1, this.gj_1);
1538
1578
  }
1539
- fq() {
1579
+ gq() {
1540
1580
  var tmp0 = this.oj_1;
1541
1581
  var tmp = KProperty1;
1542
1582
  // Inline function 'kotlin.getValue' call
1543
1583
  getPropertyCallableRef('check', 1, tmp, Position$_get_check_$ref_tp97h(), null);
1544
1584
  return tmp0.h2();
1545
1585
  }
1546
- gq() {
1586
+ hq() {
1547
1587
  var tmp0 = this.pj_1;
1548
1588
  var tmp = KProperty1;
1549
1589
  // Inline function 'kotlin.getValue' call
1550
1590
  getPropertyCallableRef('checkmate', 1, tmp, Position$_get_checkmate_$ref_mwt4hk(), null);
1551
1591
  return tmp0.h2();
1552
1592
  }
1553
- hq() {
1593
+ iq() {
1554
1594
  var tmp0 = this.qj_1;
1555
1595
  var tmp = KProperty1;
1556
1596
  // Inline function 'kotlin.getValue' call
1557
1597
  getPropertyCallableRef('stalemate', 1, tmp, Position$_get_stalemate_$ref_l6lqf(), null);
1558
1598
  return tmp0.h2();
1559
1599
  }
1560
- iq() {
1600
+ jq() {
1561
1601
  var tmp0 = this.rj_1;
1562
1602
  var tmp = KProperty1;
1563
1603
  // Inline function 'kotlin.getValue' call
1564
1604
  getPropertyCallableRef('lackOfMaterial', 1, tmp, Position$_get_lackOfMaterial_$ref_whrjuu(), null);
1565
1605
  return tmp0.h2();
1566
1606
  }
1567
- rm() {
1607
+ sm() {
1568
1608
  var tmp0 = this.sj_1;
1569
1609
  var tmp = KProperty1;
1570
1610
  // Inline function 'kotlin.getValue' call
1571
1611
  getPropertyCallableRef('fiftyMoves', 1, tmp, Position$_get_fiftyMoves_$ref_ima66z(), null);
1572
1612
  return tmp0.h2();
1573
1613
  }
1574
- jq() {
1614
+ kq() {
1575
1615
  var tmp0 = this.tj_1;
1576
1616
  var tmp = KProperty1;
1577
1617
  // Inline function 'kotlin.getValue' call
1578
1618
  getPropertyCallableRef('zobrist', 1, tmp, Position$_get_zobrist_$ref_t8al0g(), null);
1579
1619
  return tmp0.h2();
1580
1620
  }
1581
- kq() {
1621
+ lq() {
1582
1622
  var sqs = new Int32Array(64);
1583
- var b = this.eq();
1623
+ var b = this.fq();
1584
1624
  var inductionVariable = 0;
1585
1625
  if (inductionVariable <= 63)
1586
1626
  do {
@@ -1600,10 +1640,10 @@ class Position {
1600
1640
  while (inductionVariable <= 63);
1601
1641
  return sqs;
1602
1642
  }
1603
- lq() {
1604
- return toFen(this.kq(), this.fj_1, this.hj_1, this.ij_1, this.jj_1, this.kj_1, this.gj_1, this.mj_1, this.lj_1);
1643
+ mq() {
1644
+ return toFen(this.lq(), this.fj_1, this.hj_1, this.ij_1, this.jj_1, this.kj_1, this.gj_1, this.mj_1, this.lj_1);
1605
1645
  }
1606
- static mq() {
1646
+ static nq() {
1607
1647
  Companion_getInstance_5();
1608
1648
  var $this = createThis(this);
1609
1649
  init_io_github_lunalobos_chess4kt_Position($this);
@@ -1681,7 +1721,7 @@ class Position {
1681
1721
  $this.mj_1 = 0;
1682
1722
  return $this;
1683
1723
  }
1684
- static nq(bitboards, whiteMove, enPassant, whiteCastleKingside, whiteCastleQueenside, blackCastleKingside, blackCastleQueenside, mc, hm) {
1724
+ static oq(bitboards, whiteMove, enPassant, whiteCastleKingside, whiteCastleQueenside, blackCastleKingside, blackCastleQueenside, mc, hm) {
1685
1725
  Companion_getInstance_5();
1686
1726
  var $this = createThis(this);
1687
1727
  init_io_github_lunalobos_chess4kt_Position($this);
@@ -1696,7 +1736,7 @@ class Position {
1696
1736
  $this.mj_1 = hm;
1697
1737
  return $this;
1698
1738
  }
1699
- static oq(fen) {
1739
+ static pq(fen) {
1700
1740
  Companion_getInstance_5();
1701
1741
  var $this = createThis(this);
1702
1742
  init_io_github_lunalobos_chess4kt_Position($this);
@@ -1715,7 +1755,7 @@ class Position {
1715
1755
  while (inductionVariable_0 < last) {
1716
1756
  var character = chars[inductionVariable_0];
1717
1757
  inductionVariable_0 = inductionVariable_0 + 1 | 0;
1718
- if (Companion_getInstance_5().cq_1.d2(new Char(character))) {
1758
+ if (Companion_getInstance_5().dq_1.d2(new Char(character))) {
1719
1759
  i = i + toInt(toString_1(character)) | 0;
1720
1760
  } else {
1721
1761
  if (character === _Char___init__impl__6a9atx(80)) {
@@ -1816,10 +1856,10 @@ class Position {
1816
1856
  return $this;
1817
1857
  }
1818
1858
  hashCode() {
1819
- return getBigIntHashCode(this.jq());
1859
+ return getBigIntHashCode(this.kq());
1820
1860
  }
1821
1861
  toString() {
1822
- return stringRepresentation(this.kq(), this.lq());
1862
+ return stringRepresentation(this.lq(), this.mq());
1823
1863
  }
1824
1864
  equals(other) {
1825
1865
  var tmp;
@@ -1832,7 +1872,7 @@ class Position {
1832
1872
  if (!(other instanceof Position)) {
1833
1873
  tmp = false;
1834
1874
  } else {
1835
- tmp = (contentEquals(this.eq(), other.eq()) && this.fj_1 === other.fj_1 && this.gj_1 === other.gj_1 && this.hj_1 === other.hj_1 && this.ij_1 === other.ij_1 && this.jj_1 === other.jj_1 && this.kj_1 === other.kj_1);
1875
+ tmp = (contentEquals(this.fq(), other.fq()) && this.fj_1 === other.fj_1 && this.gj_1 === other.gj_1 && this.hj_1 === other.hj_1 && this.ij_1 === other.ij_1 && this.jj_1 === other.jj_1 && this.kj_1 === other.kj_1);
1836
1876
  }
1837
1877
  }
1838
1878
  }
@@ -1841,23 +1881,23 @@ class Position {
1841
1881
  }
1842
1882
  class RegularPieceMoves {
1843
1883
  constructor(piece, square, enemies, moves, moveFunction) {
1844
- this.yo_1 = piece;
1845
- this.zo_1 = square;
1846
- this.ap_1 = enemies;
1847
- this.bp_1 = moves;
1848
- this.cp_1 = moveFunction;
1884
+ this.zo_1 = piece;
1885
+ this.ap_1 = square;
1886
+ this.bp_1 = enemies;
1887
+ this.cp_1 = moves;
1888
+ this.dp_1 = moveFunction;
1849
1889
  var tmp = this;
1850
- tmp.dp_1 = lazy(RegularPieceMoves$allMovesList$delegate$lambda(this));
1890
+ tmp.ep_1 = lazy(RegularPieceMoves$allMovesList$delegate$lambda(this));
1851
1891
  }
1852
- hn() {
1853
- var tmp0 = this.dp_1;
1892
+ in() {
1893
+ var tmp0 = this.ep_1;
1854
1894
  var tmp = KProperty1;
1855
1895
  // Inline function 'kotlin.getValue' call
1856
1896
  getPropertyCallableRef('allMovesList', 1, tmp, RegularPieceMoves$_get_allMovesList_$ref_ts1d8v(), null);
1857
1897
  return tmp0.h2();
1858
1898
  }
1859
1899
  toString() {
1860
- return 'RegularPieceMoves(piece=' + get_entries_0().c1(this.yo_1).toString() + ', origin=' + get_entries_2().c1(this.zo_1).toString() + ', enemies=' + toString(toSquares(_Bitboard___init__impl__wiz5h4(this.ap_1))) + ', moves=' + toString(this.hn()) + ')';
1900
+ return 'RegularPieceMoves(piece=' + get_entries_0().c1(this.zo_1).toString() + ', origin=' + get_entries_2().c1(this.ap_1).toString() + ', enemies=' + toString(toSquares(_Bitboard___init__impl__wiz5h4(this.bp_1))) + ', moves=' + toString(this.in()) + ')';
1861
1901
  }
1862
1902
  }
1863
1903
  class Side extends Enum {}
@@ -1870,17 +1910,17 @@ class Square extends Enum {}
1870
1910
  class Token {
1871
1911
  constructor(type, value, line) {
1872
1912
  line = line === VOID ? 0 : line;
1873
- this.lp_1 = type;
1874
- this.mp_1 = value;
1875
- this.np_1 = line;
1913
+ this.mp_1 = type;
1914
+ this.np_1 = value;
1915
+ this.op_1 = line;
1876
1916
  }
1877
1917
  toString() {
1878
- return 'Token(type=' + this.lp_1.toString() + ', value=' + this.mp_1 + ', line=' + this.np_1 + ')';
1918
+ return 'Token(type=' + this.mp_1.toString() + ', value=' + this.np_1 + ', line=' + this.op_1 + ')';
1879
1919
  }
1880
1920
  hashCode() {
1881
- var result = this.lp_1.hashCode();
1882
- result = imul(result, 31) + getStringHashCode(this.mp_1) | 0;
1883
- result = imul(result, 31) + this.np_1 | 0;
1921
+ var result = this.mp_1.hashCode();
1922
+ result = imul(result, 31) + getStringHashCode(this.np_1) | 0;
1923
+ result = imul(result, 31) + this.op_1 | 0;
1884
1924
  return result;
1885
1925
  }
1886
1926
  equals(other) {
@@ -1888,28 +1928,28 @@ class Token {
1888
1928
  return true;
1889
1929
  if (!(other instanceof Token))
1890
1930
  return false;
1891
- if (!this.lp_1.equals(other.lp_1))
1892
- return false;
1893
- if (!(this.mp_1 === other.mp_1))
1931
+ if (!this.mp_1.equals(other.mp_1))
1894
1932
  return false;
1895
1933
  if (!(this.np_1 === other.np_1))
1896
1934
  return false;
1935
+ if (!(this.op_1 === other.op_1))
1936
+ return false;
1897
1937
  return true;
1898
1938
  }
1899
1939
  }
1900
1940
  class TokenType extends Enum {}
1901
1941
  class Tokenizer {
1902
1942
  constructor(pgnInput) {
1903
- this.pq_1 = pgnInput;
1904
- this.qq_1 = 0;
1905
- this.rq_1 = 1;
1943
+ this.qq_1 = pgnInput;
1944
+ this.rq_1 = 0;
1945
+ this.sq_1 = 1;
1906
1946
  var tmp = this;
1907
1947
  // Inline function 'kotlin.collections.mutableListOf' call
1908
- tmp.sq_1 = ArrayList.h1();
1948
+ tmp.tq_1 = ArrayList.h1();
1909
1949
  }
1910
- tq() {
1911
- while (this.qq_1 < this.pq_1.length) {
1912
- var char = charCodeAt(this.pq_1, this.qq_1);
1950
+ uq() {
1951
+ while (this.rq_1 < this.qq_1.length) {
1952
+ var char = charCodeAt(this.qq_1, this.rq_1);
1913
1953
  if (isWhitespace(char)) {
1914
1954
  consumeWhitespace(this);
1915
1955
  } else if (char === _Char___init__impl__6a9atx(91)) {
@@ -1937,15 +1977,15 @@ class Tokenizer {
1937
1977
  } else if (isLetter(char) || char === _Char___init__impl__6a9atx(95) || char === _Char___init__impl__6a9atx(43) || char === _Char___init__impl__6a9atx(35) || char === _Char___init__impl__6a9atx(61) || char === _Char___init__impl__6a9atx(58) || char === _Char___init__impl__6a9atx(45)) {
1938
1978
  consumeSymbol(this);
1939
1979
  } else {
1940
- this.qq_1 = this.qq_1 + 1 | 0;
1980
+ this.rq_1 = this.rq_1 + 1 | 0;
1941
1981
  }
1942
1982
  }
1943
- this.sq_1.k(new Token(TokenType_EOF_getInstance(), '', this.rq_1));
1944
- return this.sq_1;
1983
+ this.tq_1.k(new Token(TokenType_EOF_getInstance(), '', this.sq_1));
1984
+ return this.tq_1;
1945
1985
  }
1946
1986
  }
1947
1987
  class Tuple {
1948
- static uq(v1, v2) {
1988
+ static vq(v1, v2) {
1949
1989
  var $this = createThis(this);
1950
1990
  init_io_github_lunalobos_chess4kt_Tuple($this);
1951
1991
  $this.pk_1 = v1;
@@ -1985,14 +2025,14 @@ class Tuple {
1985
2025
  }
1986
2026
  class bitboardToSequence$slambda {
1987
2027
  constructor($bitboard, $entitiesFactory) {
1988
- this.vq_1 = $bitboard;
1989
- this.wq_1 = $entitiesFactory;
2028
+ this.wq_1 = $bitboard;
2029
+ this.xq_1 = $entitiesFactory;
1990
2030
  }
1991
- xq($this$sequence, $completion) {
2031
+ yq($this$sequence, $completion) {
1992
2032
  return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_2.bind(VOID, this, $this$sequence), $completion);
1993
2033
  }
1994
2034
  w9(p1, $completion) {
1995
- return this.xq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
2035
+ return this.yq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1996
2036
  }
1997
2037
  }
1998
2038
  class Companion_7 {
@@ -2013,11 +2053,11 @@ class Companion_7 {
2013
2053
  }
2014
2054
  class Bitboard {
2015
2055
  constructor(value) {
2016
- this.yq_1 = value;
2056
+ this.zq_1 = value;
2017
2057
  }
2018
2058
  toString() {
2019
2059
  var sb = StringBuilder.n8(500);
2020
- var inverted = reverse(Companion_instance_7, this.yq_1);
2060
+ var inverted = reverse(Companion_instance_7, this.zq_1);
2021
2061
  var mask = 255n;
2022
2062
  sb.j8('\n+---+---+---+---+---+---+---+---+ \n');
2023
2063
  var inductionVariable = 0;
@@ -2047,73 +2087,89 @@ class Bitboard {
2047
2087
  return sb.toString();
2048
2088
  }
2049
2089
  peekLastBit() {
2050
- return new Bitboard(takeLowestOneBit(this.yq_1));
2090
+ return new Bitboard(takeLowestOneBit(this.zq_1));
2051
2091
  }
2052
2092
  peekFirstBit() {
2053
- return new Bitboard(takeHighestOneBit(this.yq_1));
2093
+ return new Bitboard(takeHighestOneBit(this.zq_1));
2054
2094
  }
2055
2095
  trailingZeros() {
2056
- return countTrailingZeroBits(this.yq_1);
2096
+ return countTrailingZeroBits(this.zq_1);
2057
2097
  }
2058
2098
  leadingZeros() {
2059
- return countLeadingZeroBits(this.yq_1);
2099
+ return countLeadingZeroBits(this.zq_1);
2060
2100
  }
2061
2101
  and(other) {
2062
- return new Bitboard(this.yq_1 & other.yq_1);
2102
+ return new Bitboard(this.zq_1 & other.zq_1);
2063
2103
  }
2064
2104
  or(other) {
2065
- return new Bitboard(this.yq_1 | other.yq_1);
2105
+ return new Bitboard(this.zq_1 | other.zq_1);
2066
2106
  }
2067
2107
  xor(other) {
2068
- return new Bitboard(this.yq_1 ^ other.yq_1);
2108
+ return new Bitboard(this.zq_1 ^ other.zq_1);
2069
2109
  }
2070
2110
  inv() {
2071
- return new Bitboard(~this.yq_1);
2111
+ return new Bitboard(~this.zq_1);
2072
2112
  }
2073
2113
  shl(i) {
2074
- return new Bitboard(shiftLeft(this.yq_1, i));
2114
+ return new Bitboard(shiftLeft(this.zq_1, i));
2075
2115
  }
2076
2116
  ushr(i) {
2077
- return new Bitboard(shiftRightUnsigned(this.yq_1, i));
2117
+ return new Bitboard(shiftRightUnsigned(this.zq_1, i));
2078
2118
  }
2079
2119
  toArray() {
2080
- return toList(bitboardToSequence(this.yq_1, Bitboard$toArray$lambda)).e2();
2120
+ return toList(bitboardToSequence(this.zq_1, Bitboard$toArray$lambda)).e2();
2121
+ }
2122
+ bitCount() {
2123
+ return countOneBits(this.zq_1);
2124
+ }
2125
+ equals(other) {
2126
+ if (this === other)
2127
+ return true;
2128
+ if (other == null)
2129
+ return false;
2130
+ var tmp;
2131
+ if (other instanceof Bitboard) {
2132
+ tmp = this.zq_1 === other.zq_1;
2133
+ } else {
2134
+ tmp = false;
2135
+ }
2136
+ return tmp;
2081
2137
  }
2082
2138
  }
2083
2139
  class EcoInfo_0 {
2084
2140
  constructor(backedEcoInfo) {
2085
- this.zq_1 = backedEcoInfo;
2086
- }
2087
- ar() {
2088
- return this.zq_1;
2141
+ this.ar_1 = backedEcoInfo;
2089
2142
  }
2090
2143
  br() {
2091
- return this.zq_1.mi_1;
2144
+ return this.ar_1;
2092
2145
  }
2093
2146
  cr() {
2094
- return this.zq_1.li_1;
2147
+ return this.ar_1.mi_1;
2148
+ }
2149
+ dr() {
2150
+ return this.ar_1.li_1;
2095
2151
  }
2096
2152
  get name() {
2097
- return this.br();
2153
+ return this.cr();
2098
2154
  }
2099
2155
  get eco() {
2100
- return this.cr();
2156
+ return this.dr();
2101
2157
  }
2102
2158
  }
2103
2159
  class Game_0 {
2104
2160
  constructor(backedGame) {
2105
- this.dr_1 = backedGame;
2106
- this.root = new Node_0(this.dr_1.wj_1);
2107
- this.id = this.dr_1.lk_1;
2161
+ this.er_1 = backedGame;
2162
+ this.root = new Node_0(this.er_1.wj_1);
2163
+ this.id = this.er_1.lk_1;
2108
2164
  }
2109
- er() {
2165
+ fr() {
2110
2166
  return this.root;
2111
2167
  }
2112
- fr(value) {
2113
- this.dr_1.lm(value == null ? null : value.zq_1);
2168
+ gr(value) {
2169
+ this.er_1.mm(value == null ? null : value.ar_1);
2114
2170
  }
2115
- gr() {
2116
- var tmp0_safe_receiver = this.dr_1.ek_1;
2171
+ hr() {
2172
+ var tmp0_safe_receiver = this.er_1.ek_1;
2117
2173
  var tmp;
2118
2174
  if (tmp0_safe_receiver == null) {
2119
2175
  tmp = null;
@@ -2123,10 +2179,10 @@ class Game_0 {
2123
2179
  }
2124
2180
  return tmp;
2125
2181
  }
2126
- hr() {
2182
+ ir() {
2127
2183
  return this.id;
2128
2184
  }
2129
- ir(value) {
2185
+ jr(value) {
2130
2186
  var tmp;
2131
2187
  if (value == null) {
2132
2188
  tmp = null;
@@ -2134,58 +2190,58 @@ class Game_0 {
2134
2190
  // Inline function 'kotlin.let' call
2135
2191
  tmp = valueOf_2(value);
2136
2192
  }
2137
- this.dr_1.mm(tmp);
2193
+ this.er_1.nm(tmp);
2138
2194
  }
2139
- jr() {
2140
- var tmp0_safe_receiver = this.dr_1.fk_1;
2195
+ kr() {
2196
+ var tmp0_safe_receiver = this.er_1.fk_1;
2141
2197
  return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.toString();
2142
2198
  }
2143
- jm(value) {
2144
- this.dr_1.jm(value);
2145
- }
2146
- rm() {
2147
- return this.dr_1.bk_1;
2199
+ km(value) {
2200
+ this.er_1.km(value);
2148
2201
  }
2149
- nm(value) {
2150
- this.dr_1.nm(value);
2202
+ sm() {
2203
+ return this.er_1.bk_1;
2151
2204
  }
2152
- kr() {
2153
- return this.dr_1.jk_1;
2205
+ om(value) {
2206
+ this.er_1.om(value);
2154
2207
  }
2155
2208
  lr() {
2156
- return this.dr_1.hk_1.toString();
2157
- }
2158
- om(value) {
2159
- this.dr_1.om(value);
2209
+ return this.er_1.jk_1;
2160
2210
  }
2161
2211
  mr() {
2162
- return this.dr_1.kk_1;
2212
+ return this.er_1.hk_1.toString();
2163
2213
  }
2164
- hm(value) {
2165
- this.dr_1.hm(value);
2214
+ pm(value) {
2215
+ this.er_1.pm(value);
2166
2216
  }
2167
2217
  nr() {
2168
- return this.dr_1.zj_1;
2218
+ return this.er_1.kk_1;
2169
2219
  }
2170
- km(value) {
2171
- this.dr_1.km(value);
2220
+ im(value) {
2221
+ this.er_1.im(value);
2172
2222
  }
2173
2223
  pr() {
2174
- return this.dr_1.ck_1;
2224
+ return this.er_1.zj_1;
2175
2225
  }
2176
- qr() {
2177
- return this.dr_1.gk_1.toString();
2226
+ lm(value) {
2227
+ this.er_1.lm(value);
2178
2228
  }
2179
- im(value) {
2180
- this.dr_1.im(value);
2229
+ qr() {
2230
+ return this.er_1.ck_1;
2181
2231
  }
2182
2232
  rr() {
2183
- return this.dr_1.ak_1;
2233
+ return this.er_1.gk_1.toString();
2234
+ }
2235
+ jm(value) {
2236
+ this.er_1.jm(value);
2184
2237
  }
2185
2238
  sr() {
2239
+ return this.er_1.ak_1;
2240
+ }
2241
+ tr() {
2186
2242
  var p = {};
2187
2243
  // Inline function 'kotlin.collections.forEach' call
2188
- var _iterator__ex2g4s = this.dr_1.xj_1.k2().x();
2244
+ var _iterator__ex2g4s = this.er_1.xj_1.k2().x();
2189
2245
  while (_iterator__ex2g4s.z()) {
2190
2246
  var element = _iterator__ex2g4s.a1();
2191
2247
  p[element.g2()] = element.h2();
@@ -2194,16 +2250,16 @@ class Game_0 {
2194
2250
  }
2195
2251
  setTag(name, value) {
2196
2252
  // Inline function 'kotlin.collections.set' call
2197
- this.dr_1.xj_1.f5(name, value);
2253
+ this.er_1.xj_1.f5(name, value);
2198
2254
  }
2199
2255
  getTag(name) {
2200
- return this.dr_1.xj_1.j2(name);
2256
+ return this.er_1.xj_1.j2(name);
2201
2257
  }
2202
2258
  toString() {
2203
- return this.dr_1.toString();
2259
+ return this.er_1.toString();
2204
2260
  }
2205
- sm(idSupplier) {
2206
- return new Game_0(this.dr_1.sm(idSupplier));
2261
+ tm(idSupplier) {
2262
+ return new Game_0(this.er_1.tm(idSupplier));
2207
2263
  }
2208
2264
  toAnalysis(idSupplier, $super) {
2209
2265
  var tmp;
@@ -2213,90 +2269,93 @@ class Game_0 {
2213
2269
  tmp = idSupplier;
2214
2270
  }
2215
2271
  idSupplier = tmp;
2216
- return $super === VOID ? this.sm(idSupplier) : $super.sm.call(this, idSupplier);
2272
+ return $super === VOID ? this.tm(idSupplier) : $super.tm.call(this, idSupplier);
2217
2273
  }
2218
2274
  deleteFromExclusive(node) {
2219
- return new Node_0(deleteFromExclusive(this.dr_1, node.tr_1));
2275
+ return new Node_0(deleteFromExclusive(this.er_1, node.ur_1));
2220
2276
  }
2221
2277
  deleteFromInclusive(node) {
2222
- return new Node_0(deleteFromInclusive(this.dr_1, node.tr_1));
2278
+ return new Node_0(deleteFromInclusive(this.er_1, node.ur_1));
2223
2279
  }
2224
2280
  deleteBefore(_this__u8e3s4, node) {
2225
- return new Node_0(deleteBefore(_this__u8e3s4.dr_1, node.tr_1));
2281
+ return new Node_0(deleteBefore(_this__u8e3s4.er_1, node.ur_1));
2282
+ }
2283
+ updateEco() {
2284
+ this.er_1.tl();
2226
2285
  }
2227
2286
  get ecoInfo() {
2228
- return this.gr();
2287
+ return this.hr();
2229
2288
  }
2230
2289
  set ecoInfo(value) {
2231
- this.fr(value);
2290
+ this.gr(value);
2232
2291
  }
2233
2292
  get result() {
2234
- return this.jr();
2293
+ return this.kr();
2235
2294
  }
2236
2295
  set result(value) {
2237
- this.ir(value);
2296
+ this.jr(value);
2238
2297
  }
2239
2298
  get fiftyMoves() {
2240
- return this.rm();
2299
+ return this.sm();
2241
2300
  }
2242
2301
  set fiftyMoves(value) {
2243
- this.jm(value);
2302
+ this.km(value);
2244
2303
  }
2245
2304
  get finalComment() {
2246
- return this.kr();
2305
+ return this.lr();
2247
2306
  }
2248
2307
  set finalComment(value) {
2249
- this.nm(value);
2308
+ this.om(value);
2250
2309
  }
2251
2310
  get fiftyMovesRuleMode() {
2252
- return this.lr();
2311
+ return this.mr();
2253
2312
  }
2254
2313
  get finalEndLineComment() {
2255
- return this.mr();
2314
+ return this.nr();
2256
2315
  }
2257
2316
  set finalEndLineComment(value) {
2258
- this.om(value);
2317
+ this.pm(value);
2259
2318
  }
2260
2319
  get fiveRepetitions() {
2261
- return this.nr();
2320
+ return this.pr();
2262
2321
  }
2263
2322
  set fiveRepetitions(value) {
2264
- this.hm(value);
2323
+ this.im(value);
2265
2324
  }
2266
2325
  get seventyFiveMoves() {
2267
- return this.pr();
2326
+ return this.qr();
2268
2327
  }
2269
2328
  set seventyFiveMoves(value) {
2270
- this.km(value);
2329
+ this.lm(value);
2271
2330
  }
2272
2331
  get threeRepetitionsMode() {
2273
- return this.qr();
2332
+ return this.rr();
2274
2333
  }
2275
2334
  get threeRepetitionsWarning() {
2276
- return this.rr();
2335
+ return this.sr();
2277
2336
  }
2278
2337
  set threeRepetitionsWarning(value) {
2279
- this.im(value);
2338
+ this.jm(value);
2280
2339
  }
2281
2340
  get tags() {
2282
- return this.sr();
2341
+ return this.tr();
2283
2342
  }
2284
2343
  }
2285
2344
  class Move_0 {
2286
2345
  constructor(backedMove) {
2287
2346
  this.backedMove = backedMove;
2288
2347
  }
2289
- ur() {
2290
- return this.backedMove;
2291
- }
2292
2348
  vr() {
2293
- return this.backedMove.pn_1;
2349
+ return this.backedMove;
2294
2350
  }
2295
2351
  wr() {
2296
- return this.backedMove.rn_1;
2352
+ return this.backedMove.qn_1;
2297
2353
  }
2298
2354
  xr() {
2299
- return this.backedMove.qn_1;
2355
+ return this.backedMove.sn_1;
2356
+ }
2357
+ yr() {
2358
+ return this.backedMove.rn_1;
2300
2359
  }
2301
2360
  hashCode() {
2302
2361
  return this.backedMove.hashCode();
@@ -2314,27 +2373,27 @@ class Move_0 {
2314
2373
  return this.backedMove.toString();
2315
2374
  }
2316
2375
  get origin() {
2317
- return this.vr();
2376
+ return this.wr();
2318
2377
  }
2319
2378
  get target() {
2320
- return this.wr();
2379
+ return this.xr();
2321
2380
  }
2322
2381
  get promotionPiece() {
2323
- return this.xr();
2382
+ return this.yr();
2324
2383
  }
2325
2384
  }
2326
2385
  class Node_0 {
2327
2386
  constructor(backedNode) {
2328
- this.tr_1 = backedNode;
2387
+ this.ur_1 = backedNode;
2329
2388
  }
2330
- yr() {
2331
- return this.tr_1;
2389
+ zr() {
2390
+ return this.ur_1;
2332
2391
  }
2333
2392
  uj() {
2334
- return new Position_0(this.tr_1.uj());
2393
+ return new Position_0(this.ur_1.uj());
2335
2394
  }
2336
2395
  rk() {
2337
- var tmp0_safe_receiver = this.tr_1.rk();
2396
+ var tmp0_safe_receiver = this.ur_1.rk();
2338
2397
  var tmp;
2339
2398
  if (tmp0_safe_receiver == null) {
2340
2399
  tmp = null;
@@ -2346,7 +2405,7 @@ class Node_0 {
2346
2405
  }
2347
2406
  bj() {
2348
2407
  // Inline function 'kotlin.collections.map' call
2349
- var this_0 = this.tr_1.bj();
2408
+ var this_0 = this.ur_1.bj();
2350
2409
  // Inline function 'kotlin.collections.mapTo' call
2351
2410
  var destination = ArrayList.l5(collectionSizeOrDefault(this_0, 10));
2352
2411
  var _iterator__ex2g4s = this_0.x();
@@ -2358,20 +2417,20 @@ class Node_0 {
2358
2417
  return destination.e2();
2359
2418
  }
2360
2419
  sk() {
2361
- return this.tr_1.sk();
2420
+ return this.ur_1.sk();
2362
2421
  }
2363
2422
  cj() {
2364
- return this.tr_1.cj();
2423
+ return this.ur_1.cj();
2365
2424
  }
2366
2425
  dj() {
2367
- return this.tr_1.dj();
2426
+ return this.ur_1.dj();
2368
2427
  }
2369
2428
  tk() {
2370
- var tmp0_safe_receiver = this.tr_1.tk();
2429
+ var tmp0_safe_receiver = this.ur_1.tk();
2371
2430
  return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e2();
2372
2431
  }
2373
2432
  aj() {
2374
- var tmp0_safe_receiver = this.tr_1.aj();
2433
+ var tmp0_safe_receiver = this.ur_1.aj();
2375
2434
  var tmp;
2376
2435
  if (tmp0_safe_receiver == null) {
2377
2436
  tmp = null;
@@ -2381,7 +2440,7 @@ class Node_0 {
2381
2440
  }
2382
2441
  return tmp;
2383
2442
  }
2384
- zr(move, initialComment, comment, endLineComment, suffixAnnotations, notation) {
2443
+ as(move, initialComment, comment, endLineComment, suffixAnnotations, notation) {
2385
2444
  var tmp;
2386
2445
  if (suffixAnnotations == null) {
2387
2446
  tmp = null;
@@ -2389,7 +2448,7 @@ class Node_0 {
2389
2448
  // Inline function 'kotlin.js.collections.toList' call
2390
2449
  tmp = createListFrom(suffixAnnotations);
2391
2450
  }
2392
- return new Node_0(this.tr_1.vk(move, initialComment, comment, endLineComment, tmp, valueOf_3(notation.name)));
2451
+ return new Node_0(this.ur_1.vk(move, initialComment, comment, endLineComment, tmp, valueOf_3(notation.name)));
2393
2452
  }
2394
2453
  appendMove(move, initialComment, comment, endLineComment, suffixAnnotations, notation, $super) {
2395
2454
  initialComment = initialComment === VOID ? null : initialComment;
@@ -2397,40 +2456,48 @@ class Node_0 {
2397
2456
  endLineComment = endLineComment === VOID ? null : endLineComment;
2398
2457
  suffixAnnotations = suffixAnnotations === VOID ? null : suffixAnnotations;
2399
2458
  notation = notation === VOID ? get_SAN() : notation;
2400
- return $super === VOID ? this.zr(move, initialComment, comment, endLineComment, suffixAnnotations, notation) : $super.zr.call(this, move, initialComment, comment, endLineComment, suffixAnnotations, notation);
2459
+ return $super === VOID ? this.as(move, initialComment, comment, endLineComment, suffixAnnotations, notation) : $super.as.call(this, move, initialComment, comment, endLineComment, suffixAnnotations, notation);
2401
2460
  }
2402
2461
  promoteChild(index) {
2403
- return this.tr_1.xk(index);
2462
+ return this.ur_1.xk(index);
2404
2463
  }
2405
2464
  promoteNode() {
2406
- return this.tr_1.yk();
2465
+ return this.ur_1.yk();
2407
2466
  }
2408
2467
  removeChild(node) {
2409
- return this.tr_1.zk(node.tr_1);
2468
+ return this.ur_1.zk(node.ur_1);
2410
2469
  }
2411
2470
  hasChildren() {
2412
- return this.tr_1.al();
2471
+ return this.ur_1.al();
2413
2472
  }
2414
2473
  belongsToMainLine() {
2415
- return this.tr_1.bl();
2474
+ return this.ur_1.bl();
2416
2475
  }
2417
2476
  copy(parent) {
2418
- return new Node_0(this.tr_1.cl(parent == null ? null : parent.tr_1));
2477
+ return new Node_0(this.ur_1.cl(parent == null ? null : parent.ur_1));
2419
2478
  }
2420
2479
  hashCode() {
2421
- return hashCode(this.tr_1);
2480
+ return hashCode(this.ur_1);
2422
2481
  }
2423
2482
  equals(other) {
2424
2483
  var tmp;
2425
2484
  if (other instanceof Node_0) {
2426
- tmp = equals(this.tr_1, other.tr_1);
2485
+ tmp = equals(this.ur_1, other.ur_1);
2427
2486
  } else {
2428
2487
  tmp = false;
2429
2488
  }
2430
2489
  return tmp;
2431
2490
  }
2432
2491
  toString() {
2433
- return toString(this.tr_1);
2492
+ return toString(this.ur_1);
2493
+ }
2494
+ dl(language, pieces) {
2495
+ return this.ur_1.dl(language, pieces);
2496
+ }
2497
+ toSan(language, pieces, $super) {
2498
+ language = language === VOID ? 'english' : language;
2499
+ pieces = pieces === VOID ? null : pieces;
2500
+ return $super === VOID ? this.dl(language, pieces) : $super.dl.call(this, language, pieces);
2434
2501
  }
2435
2502
  get position() {
2436
2503
  return this.uj();
@@ -2485,13 +2552,13 @@ class Companion_8 {
2485
2552
  var pair = to(element.l2_1, new Notation_0(element.l2_1));
2486
2553
  destination_0.f5(pair.md_1, pair.nd_1);
2487
2554
  }
2488
- tmp_0.as_1 = destination_0;
2555
+ tmp_0.bs_1 = destination_0;
2489
2556
  }
2490
2557
  k2() {
2491
2558
  return this.entries;
2492
2559
  }
2493
2560
  get(name) {
2494
- return this.as_1.j2(name);
2561
+ return this.bs_1.j2(name);
2495
2562
  }
2496
2563
  }
2497
2564
  class Notation_0 {
@@ -2499,7 +2566,7 @@ class Notation_0 {
2499
2566
  Companion_getInstance_8();
2500
2567
  this.name = name;
2501
2568
  }
2502
- br() {
2569
+ cr() {
2503
2570
  return this.name;
2504
2571
  }
2505
2572
  }
@@ -2529,7 +2596,7 @@ class Companion_9 {
2529
2596
  var tmp$ret$3 = new Piece_0(item_0.m2_1, item_0.l2_1);
2530
2597
  destination_0.k(tmp$ret$3);
2531
2598
  }
2532
- tmp_0.bs_1 = destination_0;
2599
+ tmp_0.cs_1 = destination_0;
2533
2600
  var tmp_1 = this;
2534
2601
  // Inline function 'kotlin.collections.associate' call
2535
2602
  var this_2 = get_entries_2();
@@ -2543,19 +2610,19 @@ class Companion_9 {
2543
2610
  var pair = to(element.l2_1, new Piece_0(element.m2_1, element.l2_1));
2544
2611
  destination_1.f5(pair.md_1, pair.nd_1);
2545
2612
  }
2546
- tmp_1.cs_1 = destination_1;
2613
+ tmp_1.ds_1 = destination_1;
2547
2614
  }
2548
2615
  k2() {
2549
2616
  return this.entries;
2550
2617
  }
2551
- ds() {
2552
- return this.bs_1;
2618
+ es() {
2619
+ return this.cs_1;
2553
2620
  }
2554
2621
  get(name) {
2555
- return this.cs_1.j2(name);
2622
+ return this.ds_1.j2(name);
2556
2623
  }
2557
2624
  indexToPiece(index) {
2558
- return this.bs_1.c1(index);
2625
+ return this.cs_1.c1(index);
2559
2626
  }
2560
2627
  }
2561
2628
  class Piece_0 {
@@ -2564,19 +2631,19 @@ class Piece_0 {
2564
2631
  this.ordinal = ordinal;
2565
2632
  this.name = name;
2566
2633
  }
2567
- es() {
2634
+ fs() {
2568
2635
  return this.ordinal;
2569
2636
  }
2570
- br() {
2637
+ cr() {
2571
2638
  return this.name;
2572
2639
  }
2573
2640
  }
2574
2641
  class Position_0 {
2575
2642
  constructor(backedPosition) {
2576
- this.fs_1 = backedPosition;
2643
+ this.gs_1 = backedPosition;
2577
2644
  var tmp = this;
2578
2645
  // Inline function 'kotlin.collections.map' call
2579
- var this_0 = this.fs_1.eq();
2646
+ var this_0 = this.gs_1.fq();
2580
2647
  // Inline function 'kotlin.collections.mapTo' call
2581
2648
  var destination = ArrayList.l5(this_0.length);
2582
2649
  var inductionVariable = 0;
@@ -2588,69 +2655,72 @@ class Position_0 {
2588
2655
  destination.k(tmp$ret$0);
2589
2656
  }
2590
2657
  tmp.bitboards = destination.e2();
2591
- this.whiteMove = this.fs_1.fj_1;
2592
- this.enPassant = this.fs_1.gj_1;
2593
- this.whiteCastleKingside = this.fs_1.hj_1;
2594
- this.whiteCastleQueenside = this.fs_1.ij_1;
2595
- this.blackCastleKingside = this.fs_1.jj_1;
2596
- this.blackCastleQueenside = this.fs_1.kj_1;
2597
- this.movesCounter = this.fs_1.lj_1;
2598
- this.halfMovesCounter = this.fs_1.mj_1;
2658
+ this.whiteMove = this.gs_1.fj_1;
2659
+ this.enPassant = this.gs_1.gj_1;
2660
+ this.whiteCastleKingside = this.gs_1.hj_1;
2661
+ this.whiteCastleQueenside = this.gs_1.ij_1;
2662
+ this.blackCastleKingside = this.gs_1.jj_1;
2663
+ this.blackCastleQueenside = this.gs_1.kj_1;
2664
+ this.movesCounter = this.gs_1.lj_1;
2665
+ this.halfMovesCounter = this.gs_1.mj_1;
2599
2666
  }
2600
- eq() {
2667
+ hs() {
2668
+ return this.gs_1;
2669
+ }
2670
+ fq() {
2601
2671
  return this.bitboards;
2602
2672
  }
2603
- gs() {
2673
+ is() {
2604
2674
  return this.whiteMove;
2605
2675
  }
2606
- hs() {
2676
+ js() {
2607
2677
  return this.enPassant;
2608
2678
  }
2609
- is() {
2679
+ ks() {
2610
2680
  return this.whiteCastleKingside;
2611
2681
  }
2612
- js() {
2682
+ ls() {
2613
2683
  return this.whiteCastleQueenside;
2614
2684
  }
2615
- ks() {
2685
+ ms() {
2616
2686
  return this.blackCastleKingside;
2617
2687
  }
2618
- ls() {
2688
+ ns() {
2619
2689
  return this.blackCastleQueenside;
2620
2690
  }
2621
- ms() {
2691
+ os() {
2622
2692
  return this.movesCounter;
2623
2693
  }
2624
- ns() {
2694
+ ps() {
2625
2695
  return this.halfMovesCounter;
2626
2696
  }
2627
- fq() {
2628
- return this.fs_1.fq();
2629
- }
2630
2697
  gq() {
2631
- return this.fs_1.gq();
2698
+ return this.gs_1.gq();
2632
2699
  }
2633
2700
  hq() {
2634
- return this.fs_1.hq();
2701
+ return this.gs_1.hq();
2635
2702
  }
2636
2703
  iq() {
2637
- return this.fs_1.iq();
2638
- }
2639
- rm() {
2640
- return this.fs_1.rm();
2704
+ return this.gs_1.iq();
2641
2705
  }
2642
2706
  jq() {
2643
- return new Bitboard(this.fs_1.jq());
2707
+ return this.gs_1.jq();
2708
+ }
2709
+ sm() {
2710
+ return this.gs_1.sm();
2644
2711
  }
2645
2712
  kq() {
2646
- return this.fs_1.kq();
2713
+ return new Bitboard(this.gs_1.kq());
2647
2714
  }
2648
2715
  lq() {
2649
- return this.fs_1.lq();
2716
+ return this.gs_1.lq();
2717
+ }
2718
+ mq() {
2719
+ return this.gs_1.mq();
2650
2720
  }
2651
2721
  bj() {
2652
2722
  // Inline function 'kotlin.collections.map' call
2653
- var this_0 = get_children(this.fs_1);
2723
+ var this_0 = get_children(this.gs_1);
2654
2724
  // Inline function 'kotlin.collections.mapTo' call
2655
2725
  var destination = ArrayList.l5(collectionSizeOrDefault(this_0, 10));
2656
2726
  var _iterator__ex2g4s = this_0.x();
@@ -2662,11 +2732,11 @@ class Position_0 {
2662
2732
  }
2663
2733
  return destination.e2();
2664
2734
  }
2665
- os() {
2666
- return get_draw(this.fs_1);
2735
+ qs() {
2736
+ return get_draw(this.gs_1);
2667
2737
  }
2668
- ps() {
2669
- var tmp0_safe_receiver = get_enPassantSquare(this.fs_1);
2738
+ rs() {
2739
+ var tmp0_safe_receiver = get_enPassantSquare(this.gs_1);
2670
2740
  var tmp;
2671
2741
  if (tmp0_safe_receiver == null) {
2672
2742
  tmp = null;
@@ -2676,87 +2746,102 @@ class Position_0 {
2676
2746
  }
2677
2747
  return tmp;
2678
2748
  }
2679
- qs() {
2680
- return get_gameOver(this.fs_1);
2749
+ ss() {
2750
+ return get_gameOver(this.gs_1);
2681
2751
  }
2682
- rs() {
2683
- return ensureNotNull(Companion_getInstance_10().get(get_sideToMove(this.fs_1).l2_1));
2752
+ ts() {
2753
+ return ensureNotNull(Companion_getInstance_10().get(get_sideToMove(this.gs_1).l2_1));
2754
+ }
2755
+ us() {
2756
+ return new Bitboard(get_friends(this.gs_1));
2757
+ }
2758
+ vs() {
2759
+ return new Bitboard(get_enemies(this.gs_1));
2684
2760
  }
2685
2761
  whiteLacksOfMaterial() {
2686
- return whiteLacksOfMaterial(this.fs_1);
2762
+ return whiteLacksOfMaterial(this.gs_1);
2687
2763
  }
2688
2764
  blackLacksOfMaterial() {
2689
- return blackLacksOfMaterial(this.fs_1);
2765
+ return blackLacksOfMaterial(this.gs_1);
2690
2766
  }
2691
2767
  pieceAt(square) {
2692
- return Companion_getInstance_9().bs_1.c1(this.squares[square.ordinal]);
2768
+ return Companion_getInstance_9().cs_1.c1(this.squares[square.ordinal]);
2693
2769
  }
2694
2770
  isLegal(move) {
2695
- return isLegal(this.fs_1, move.backedMove);
2771
+ return isLegal(this.gs_1, move.backedMove);
2696
2772
  }
2697
2773
  move(move_0) {
2698
- return new Position_0(move(this.fs_1, move_0.backedMove));
2774
+ return new Position_0(move(this.gs_1, move_0.backedMove));
2699
2775
  }
2700
- ss(move, notation) {
2701
- return new Position_0(move_0(this.fs_1, move, valueOf_3(notation.name)));
2776
+ ws(move, notation) {
2777
+ return new Position_0(move_0(this.gs_1, move, valueOf_3(notation.name)));
2702
2778
  }
2703
2779
  moveFromString(move, notation, $super) {
2704
2780
  notation = notation === VOID ? get_UCI() : notation;
2705
- return $super === VOID ? this.ss(move, notation) : $super.ss.call(this, move, notation);
2781
+ return $super === VOID ? this.ws(move, notation) : $super.ws.call(this, move, notation);
2782
+ }
2783
+ flipSide() {
2784
+ return new Position_0(flipSide(this.gs_1));
2706
2785
  }
2707
2786
  hashCode() {
2708
- return this.fs_1.hashCode();
2787
+ return this.gs_1.hashCode();
2709
2788
  }
2710
2789
  equals(other) {
2711
2790
  var tmp;
2712
2791
  if (other instanceof Position_0) {
2713
- tmp = this.fs_1.equals(other.fs_1);
2792
+ tmp = this.gs_1.equals(other.gs_1);
2714
2793
  } else {
2715
2794
  tmp = false;
2716
2795
  }
2717
2796
  return tmp;
2718
2797
  }
2719
2798
  toString() {
2720
- return this.fs_1.toString();
2799
+ return this.gs_1.toString();
2721
2800
  }
2722
2801
  get check() {
2723
- return this.fq();
2802
+ return this.gq();
2724
2803
  }
2725
2804
  get checkmate() {
2726
- return this.gq();
2805
+ return this.hq();
2727
2806
  }
2728
2807
  get stalemate() {
2729
- return this.hq();
2808
+ return this.iq();
2730
2809
  }
2731
2810
  get lackOfMaterial() {
2732
- return this.iq();
2811
+ return this.jq();
2733
2812
  }
2734
2813
  get fiftyMoves() {
2735
- return this.rm();
2814
+ return this.sm();
2736
2815
  }
2737
2816
  get zobrist() {
2738
- return this.jq();
2817
+ return this.kq();
2739
2818
  }
2740
2819
  get squares() {
2741
- return this.kq();
2820
+ return this.lq();
2742
2821
  }
2743
2822
  get fen() {
2744
- return this.lq();
2823
+ return this.mq();
2745
2824
  }
2746
2825
  get children() {
2747
2826
  return this.bj();
2748
2827
  }
2749
2828
  get draw() {
2750
- return this.os();
2829
+ return this.qs();
2751
2830
  }
2752
2831
  get enPassantSquare() {
2753
- return this.ps();
2832
+ return this.rs();
2754
2833
  }
2755
2834
  get gameOver() {
2756
- return this.qs();
2835
+ return this.ss();
2757
2836
  }
2758
2837
  get sideToMove() {
2759
- return this.rs();
2838
+ return this.ts();
2839
+ }
2840
+ get friends() {
2841
+ return this.us();
2842
+ }
2843
+ get enemies() {
2844
+ return this.vs();
2760
2845
  }
2761
2846
  }
2762
2847
  class Companion_10 {
@@ -2773,7 +2858,7 @@ class Companion_10 {
2773
2858
  var tmp$ret$0 = new Side_0(item.l2_1);
2774
2859
  destination.k(tmp$ret$0);
2775
2860
  }
2776
- tmp.ts_1 = destination;
2861
+ tmp.xs_1 = destination;
2777
2862
  var tmp_0 = this;
2778
2863
  // Inline function 'kotlin.collections.map' call
2779
2864
  var this_1 = get_entries_1();
@@ -2799,16 +2884,16 @@ class Companion_10 {
2799
2884
  var pair = to(element.l2_1, new Side_0(element.l2_1));
2800
2885
  destination_1.f5(pair.md_1, pair.nd_1);
2801
2886
  }
2802
- tmp_1.us_1 = destination_1;
2887
+ tmp_1.ys_1 = destination_1;
2803
2888
  }
2804
- ds() {
2805
- return this.ts_1;
2889
+ es() {
2890
+ return this.xs_1;
2806
2891
  }
2807
2892
  k2() {
2808
2893
  return this.entries;
2809
2894
  }
2810
2895
  get(name) {
2811
- return this.us_1.j2(name);
2896
+ return this.ys_1.j2(name);
2812
2897
  }
2813
2898
  }
2814
2899
  class Side_0 {
@@ -2816,7 +2901,7 @@ class Side_0 {
2816
2901
  Companion_getInstance_10();
2817
2902
  this.name = name;
2818
2903
  }
2819
- br() {
2904
+ cr() {
2820
2905
  return this.name;
2821
2906
  }
2822
2907
  }
@@ -2846,7 +2931,7 @@ class Companion_11 {
2846
2931
  var tmp$ret$3 = new Square_0(item_0.m2_1, item_0.l2_1);
2847
2932
  destination_0.k(tmp$ret$3);
2848
2933
  }
2849
- tmp_0.vs_1 = destination_0;
2934
+ tmp_0.zs_1 = destination_0;
2850
2935
  var tmp_1 = this;
2851
2936
  // Inline function 'kotlin.collections.associate' call
2852
2937
  var this_2 = get_entries_2();
@@ -2860,19 +2945,19 @@ class Companion_11 {
2860
2945
  var pair = to(element.l2_1, new Square_0(element.m2_1, element.l2_1));
2861
2946
  destination_1.f5(pair.md_1, pair.nd_1);
2862
2947
  }
2863
- tmp_1.ws_1 = destination_1;
2948
+ tmp_1.at_1 = destination_1;
2864
2949
  }
2865
2950
  k2() {
2866
2951
  return this.entries;
2867
2952
  }
2868
- ds() {
2869
- return this.vs_1;
2953
+ es() {
2954
+ return this.zs_1;
2870
2955
  }
2871
2956
  get(name) {
2872
- return this.ws_1.j2(name);
2957
+ return this.at_1.j2(name);
2873
2958
  }
2874
2959
  indexToSquare(index) {
2875
- return this.vs_1.c1(index);
2960
+ return this.zs_1.c1(index);
2876
2961
  }
2877
2962
  }
2878
2963
  class Square_0 {
@@ -2881,10 +2966,10 @@ class Square_0 {
2881
2966
  this.ordinal = ordinal;
2882
2967
  this.name = name;
2883
2968
  }
2884
- es() {
2969
+ fs() {
2885
2970
  return this.ordinal;
2886
2971
  }
2887
- br() {
2972
+ cr() {
2888
2973
  return this.name;
2889
2974
  }
2890
2975
  getCol() {
@@ -3105,7 +3190,7 @@ function toString_3($this, tabulation) {
3105
3190
  sb.za(p.uj().lj_1).j8('...');
3106
3191
  }
3107
3192
  }
3108
- sb.j8(toSan(p.uj(), $this.oi_1)).j8(' ');
3193
+ sb.j8(toSan_0(p.uj(), $this.oi_1)).j8(' ');
3109
3194
  var tmp6_safe_receiver = $this.si_1;
3110
3195
  if (tmp6_safe_receiver == null)
3111
3196
  null;
@@ -3403,35 +3488,35 @@ function Result_DRAW_getInstance() {
3403
3488
  return Result_DRAW_instance;
3404
3489
  }
3405
3490
  function *_generator_invoke__zhh2q8($this, $this$sequence, $completion) {
3406
- var tmp = $this$sequence.wd($this.tm_1.en(), $completion);
3491
+ var tmp = $this$sequence.wd($this.um_1.fn(), $completion);
3407
3492
  if (tmp === get_COROUTINE_SUSPENDED())
3408
3493
  tmp = yield tmp;
3409
- var tmp_0 = $this$sequence.wd($this.tm_1.fn(), $completion);
3494
+ var tmp_0 = $this$sequence.wd($this.um_1.gn(), $completion);
3410
3495
  if (tmp_0 === get_COROUTINE_SUSPENDED())
3411
3496
  tmp_0 = yield tmp_0;
3412
3497
  return Unit_instance;
3413
3498
  }
3414
3499
  function KingMoves$regularMovesList$delegate$lambda$lambda(this$0) {
3415
- return (it) => this$0.zm_1(this$0.vm_1, countTrailingZeroBits(it));
3500
+ return (it) => this$0.an_1(this$0.wm_1, countTrailingZeroBits(it));
3416
3501
  }
3417
3502
  function KingMoves$regularMovesList$delegate$lambda(this$0) {
3418
- return () => bitboardToList(this$0.xm_1, KingMoves$regularMovesList$delegate$lambda$lambda(this$0));
3503
+ return () => bitboardToList(this$0.ym_1, KingMoves$regularMovesList$delegate$lambda$lambda(this$0));
3419
3504
  }
3420
3505
  function KingMoves$_get_regularMovesList_$ref_1r6ljl() {
3421
- return (p0) => p0.en();
3506
+ return (p0) => p0.fn();
3422
3507
  }
3423
3508
  function KingMoves$castleMovesList$delegate$lambda$lambda(this$0) {
3424
- return (it) => this$0.zm_1(this$0.vm_1, countTrailingZeroBits(it));
3509
+ return (it) => this$0.an_1(this$0.wm_1, countTrailingZeroBits(it));
3425
3510
  }
3426
3511
  function KingMoves$castleMovesList$delegate$lambda(this$0) {
3427
- return () => bitboardToList(this$0.ym_1, KingMoves$castleMovesList$delegate$lambda$lambda(this$0));
3512
+ return () => bitboardToList(this$0.zm_1, KingMoves$castleMovesList$delegate$lambda$lambda(this$0));
3428
3513
  }
3429
3514
  function KingMoves$_get_castleMovesList_$ref_3suu4f() {
3430
- return (p0) => p0.fn();
3515
+ return (p0) => p0.gn();
3431
3516
  }
3432
3517
  function KingMoves$allMovesList$delegate$lambda$slambda_0(this$0) {
3433
3518
  var i = new KingMoves$allMovesList$delegate$lambda$slambda(this$0);
3434
- var l = ($this$sequence, $completion) => i.gn($this$sequence, $completion);
3519
+ var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
3435
3520
  l.$arity = 1;
3436
3521
  return l;
3437
3522
  }
@@ -3439,7 +3524,7 @@ function KingMoves$allMovesList$delegate$lambda(this$0) {
3439
3524
  return () => toList(sequence(KingMoves$allMovesList$delegate$lambda$slambda_0(this$0)));
3440
3525
  }
3441
3526
  function KingMoves$_get_allMovesList_$ref_go3t84() {
3442
- return (p0) => p0.hn();
3527
+ return (p0) => p0.in();
3443
3528
  }
3444
3529
  var Level_TRACE_instance;
3445
3530
  var Level_DEBUG_instance;
@@ -3519,67 +3604,67 @@ function init_io_github_lunalobos_chess4kt_Move(_this__u8e3s4) {
3519
3604
  Companion_getInstance_2();
3520
3605
  }
3521
3606
  function init_io_github_lunalobos_chess4kt_MoveException(_this__u8e3s4) {
3522
- captureStack(_this__u8e3s4, _this__u8e3s4.yn_1);
3607
+ captureStack(_this__u8e3s4, _this__u8e3s4.zn_1);
3523
3608
  }
3524
3609
  function *_generator_invoke__zhh2q8_0($this, $this$sequence, $completion) {
3525
- var tmp = asSequence($this.io_1.ao_1);
3610
+ var tmp = asSequence($this.jo_1.bo_1);
3526
3611
  var tmp_0 = $this$sequence.xd(flatMap(tmp, MovesInfo$movesList$delegate$lambda$slambda$lambda), $completion);
3527
3612
  if (tmp_0 === get_COROUTINE_SUSPENDED())
3528
3613
  tmp_0 = yield tmp_0;
3529
- var tmp_1 = asSequence($this.io_1.bo_1);
3614
+ var tmp_1 = asSequence($this.jo_1.co_1);
3530
3615
  var tmp_2 = $this$sequence.xd(flatMap(tmp_1, MovesInfo$movesList$delegate$lambda$slambda$lambda_0), $completion);
3531
3616
  if (tmp_2 === get_COROUTINE_SUSPENDED())
3532
3617
  tmp_2 = yield tmp_2;
3533
- var tmp_3 = asSequence($this.io_1.co_1);
3618
+ var tmp_3 = asSequence($this.jo_1.do_1);
3534
3619
  var tmp_4 = $this$sequence.xd(flatMap(tmp_3, MovesInfo$movesList$delegate$lambda$slambda$lambda_1), $completion);
3535
3620
  if (tmp_4 === get_COROUTINE_SUSPENDED())
3536
3621
  tmp_4 = yield tmp_4;
3537
- var tmp_5 = asSequence($this.io_1.do_1);
3622
+ var tmp_5 = asSequence($this.jo_1.eo_1);
3538
3623
  var tmp_6 = $this$sequence.xd(flatMap(tmp_5, MovesInfo$movesList$delegate$lambda$slambda$lambda_2), $completion);
3539
3624
  if (tmp_6 === get_COROUTINE_SUSPENDED())
3540
3625
  tmp_6 = yield tmp_6;
3541
- var tmp_7 = asSequence($this.io_1.eo_1);
3626
+ var tmp_7 = asSequence($this.jo_1.fo_1);
3542
3627
  var tmp_8 = $this$sequence.xd(flatMap(tmp_7, MovesInfo$movesList$delegate$lambda$slambda$lambda_3), $completion);
3543
3628
  if (tmp_8 === get_COROUTINE_SUSPENDED())
3544
3629
  tmp_8 = yield tmp_8;
3545
- var tmp_9 = $this$sequence.xd(asSequence($this.io_1.fo_1.hn()), $completion);
3630
+ var tmp_9 = $this$sequence.xd(asSequence($this.jo_1.go_1.in()), $completion);
3546
3631
  if (tmp_9 === get_COROUTINE_SUSPENDED())
3547
3632
  tmp_9 = yield tmp_9;
3548
3633
  return Unit_instance;
3549
3634
  }
3550
3635
  function MovesInfo$movesList$delegate$lambda$slambda$lambda(it) {
3551
- return asSequence(it.hn());
3636
+ return asSequence(it.in());
3552
3637
  }
3553
3638
  function MovesInfo$movesList$delegate$lambda$slambda$lambda_0(it) {
3554
- return asSequence(it.hn());
3639
+ return asSequence(it.in());
3555
3640
  }
3556
3641
  function MovesInfo$movesList$delegate$lambda$slambda$lambda_1(it) {
3557
- return asSequence(it.hn());
3642
+ return asSequence(it.in());
3558
3643
  }
3559
3644
  function MovesInfo$movesList$delegate$lambda$slambda$lambda_2(it) {
3560
- return asSequence(it.hn());
3645
+ return asSequence(it.in());
3561
3646
  }
3562
3647
  function MovesInfo$movesList$delegate$lambda$slambda$lambda_3(it) {
3563
- return asSequence(it.hn());
3648
+ return asSequence(it.in());
3564
3649
  }
3565
3650
  function MovesInfo$moves$delegate$lambda$lambda(it) {
3566
- return it.wo_1;
3651
+ return it.xo_1;
3567
3652
  }
3568
3653
  function MovesInfo$moves$delegate$lambda$lambda_0(it) {
3569
- return it.bp_1;
3654
+ return it.cp_1;
3570
3655
  }
3571
3656
  function MovesInfo$moves$delegate$lambda$lambda_1(it) {
3572
- return it.bp_1;
3657
+ return it.cp_1;
3573
3658
  }
3574
3659
  function MovesInfo$moves$delegate$lambda$lambda_2(it) {
3575
- return it.bp_1;
3660
+ return it.cp_1;
3576
3661
  }
3577
3662
  function MovesInfo$moves$delegate$lambda$lambda_3(it) {
3578
- return it.bp_1;
3663
+ return it.cp_1;
3579
3664
  }
3580
3665
  function MovesInfo$moves$delegate$lambda(this$0) {
3581
3666
  return () => {
3582
- var tmp = asSequence(this$0.ao_1);
3667
+ var tmp = asSequence(this$0.bo_1);
3583
3668
  // Inline function 'kotlin.sequences.fold' call
3584
3669
  var accumulator = 0n;
3585
3670
  var _iterator__ex2g4s = map(tmp, MovesInfo$moves$delegate$lambda$lambda).x();
@@ -3588,7 +3673,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
3588
3673
  accumulator = accumulator | element;
3589
3674
  }
3590
3675
  var pm = accumulator;
3591
- var tmp_0 = asSequence(this$0.bo_1);
3676
+ var tmp_0 = asSequence(this$0.co_1);
3592
3677
  // Inline function 'kotlin.sequences.fold' call
3593
3678
  var accumulator_0 = 0n;
3594
3679
  var _iterator__ex2g4s_0 = map(tmp_0, MovesInfo$moves$delegate$lambda$lambda_0).x();
@@ -3597,7 +3682,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
3597
3682
  accumulator_0 = accumulator_0 | element_0;
3598
3683
  }
3599
3684
  var nm = accumulator_0;
3600
- var tmp_1 = asSequence(this$0.co_1);
3685
+ var tmp_1 = asSequence(this$0.do_1);
3601
3686
  // Inline function 'kotlin.sequences.fold' call
3602
3687
  var accumulator_1 = 0n;
3603
3688
  var _iterator__ex2g4s_1 = map(tmp_1, MovesInfo$moves$delegate$lambda$lambda_1).x();
@@ -3606,7 +3691,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
3606
3691
  accumulator_1 = accumulator_1 | element_1;
3607
3692
  }
3608
3693
  var bm = accumulator_1;
3609
- var tmp_2 = asSequence(this$0.do_1);
3694
+ var tmp_2 = asSequence(this$0.eo_1);
3610
3695
  // Inline function 'kotlin.sequences.fold' call
3611
3696
  var accumulator_2 = 0n;
3612
3697
  var _iterator__ex2g4s_2 = map(tmp_2, MovesInfo$moves$delegate$lambda$lambda_2).x();
@@ -3615,7 +3700,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
3615
3700
  accumulator_2 = accumulator_2 | element_2;
3616
3701
  }
3617
3702
  var rm = accumulator_2;
3618
- var tmp_3 = asSequence(this$0.eo_1);
3703
+ var tmp_3 = asSequence(this$0.fo_1);
3619
3704
  // Inline function 'kotlin.sequences.fold' call
3620
3705
  var accumulator_3 = 0n;
3621
3706
  var _iterator__ex2g4s_3 = map(tmp_3, MovesInfo$moves$delegate$lambda$lambda_3).x();
@@ -3624,16 +3709,16 @@ function MovesInfo$moves$delegate$lambda(this$0) {
3624
3709
  accumulator_3 = accumulator_3 | element_3;
3625
3710
  }
3626
3711
  var qm = accumulator_3;
3627
- var km = this$0.fo_1.cn_1;
3712
+ var km = this$0.go_1.dn_1;
3628
3713
  return pm | nm | bm | rm | qm | km;
3629
3714
  };
3630
3715
  }
3631
3716
  function MovesInfo$_get_moves_$ref_54hm5y() {
3632
- return (p0) => p0.ep();
3717
+ return (p0) => p0.fp();
3633
3718
  }
3634
3719
  function MovesInfo$movesList$delegate$lambda$slambda_0(this$0) {
3635
3720
  var i = new MovesInfo$movesList$delegate$lambda$slambda(this$0);
3636
- var l = ($this$sequence, $completion) => i.gn($this$sequence, $completion);
3721
+ var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
3637
3722
  l.$arity = 1;
3638
3723
  return l;
3639
3724
  }
@@ -3641,7 +3726,7 @@ function MovesInfo$movesList$delegate$lambda(this$0) {
3641
3726
  return () => toList(sequence(MovesInfo$movesList$delegate$lambda$slambda_0(this$0)));
3642
3727
  }
3643
3728
  function MovesInfo$_get_movesList_$ref_o79khg() {
3644
- return (p0) => p0.fp();
3729
+ return (p0) => p0.gp();
3645
3730
  }
3646
3731
  var Notation_UCI_instance;
3647
3732
  var Notation_SAN_instance;
@@ -3689,30 +3774,30 @@ function Companion_getInstance_3() {
3689
3774
  return Companion_instance_3;
3690
3775
  }
3691
3776
  function parseGame($this, idSupplier) {
3692
- if (!$this.pp_1.lp_1.equals(TokenType_LBRACKET_getInstance())) {
3693
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedPgn($this)));
3777
+ if (!$this.qp_1.mp_1.equals(TokenType_LBRACKET_getInstance())) {
3778
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedPgn($this)));
3694
3779
  }
3695
- while ($this.pp_1.lp_1.equals(TokenType_LBRACKET_getInstance())) {
3780
+ while ($this.qp_1.mp_1.equals(TokenType_LBRACKET_getInstance())) {
3696
3781
  parseTag($this);
3697
3782
  }
3698
- $this.rp_1 = customGame(GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), null, $this.qp_1, idSupplier);
3699
- var tmp0_safe_receiver = $this.rp_1;
3783
+ $this.sp_1 = customGame(GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), null, $this.rp_1, idSupplier);
3784
+ var tmp0_safe_receiver = $this.sp_1;
3700
3785
  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wj_1;
3701
3786
  var tmp;
3702
3787
  if (tmp1_elvis_lhs == null) {
3703
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp("current game can't be null"));
3788
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp("current game can't be null"));
3704
3789
  } else {
3705
3790
  tmp = tmp1_elvis_lhs;
3706
3791
  }
3707
3792
  parseMoves($this, tmp);
3708
- if ($this.pp_1.lp_1.equals(TokenType_RESULT_getInstance())) {
3709
- var tmp2_safe_receiver = $this.rp_1;
3793
+ if ($this.qp_1.mp_1.equals(TokenType_RESULT_getInstance())) {
3794
+ var tmp2_safe_receiver = $this.sp_1;
3710
3795
  if (tmp2_safe_receiver == null)
3711
3796
  null;
3712
3797
  else {
3713
3798
  // Inline function 'kotlin.apply' call
3714
3799
  var tmp_0;
3715
- switch ($this.pp_1.mp_1) {
3800
+ switch ($this.qp_1.np_1) {
3716
3801
  case '1-0':
3717
3802
  tmp_0 = Result_WHITE_WIN_getInstance();
3718
3803
  break;
@@ -3723,80 +3808,80 @@ function parseGame($this, idSupplier) {
3723
3808
  tmp_0 = Result_DRAW_getInstance();
3724
3809
  break;
3725
3810
  default:
3726
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedPgn($this)));
3811
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedPgn($this)));
3727
3812
  }
3728
- tmp2_safe_receiver.mm(tmp_0);
3813
+ tmp2_safe_receiver.nm(tmp_0);
3729
3814
  }
3730
- } else if ($this.pp_1.lp_1.equals(TokenType_STAR_getInstance())) {
3731
- var tmp3_safe_receiver = $this.rp_1;
3815
+ } else if ($this.qp_1.mp_1.equals(TokenType_STAR_getInstance())) {
3816
+ var tmp3_safe_receiver = $this.sp_1;
3732
3817
  if (tmp3_safe_receiver == null)
3733
3818
  null;
3734
3819
  else {
3735
3820
  // Inline function 'kotlin.apply' call
3736
- tmp3_safe_receiver.mm(null);
3821
+ tmp3_safe_receiver.nm(null);
3737
3822
  }
3738
3823
  }
3739
- var tmp4_safe_receiver = $this.rp_1;
3824
+ var tmp4_safe_receiver = $this.sp_1;
3740
3825
  if (tmp4_safe_receiver == null)
3741
3826
  null;
3742
3827
  else {
3743
3828
  // Inline function 'kotlin.let' call
3744
- tmp4_safe_receiver.sl();
3745
- $this.tp_1.k(tmp4_safe_receiver);
3829
+ tmp4_safe_receiver.tl();
3830
+ $this.up_1.k(tmp4_safe_receiver);
3746
3831
  }
3747
3832
  reset($this);
3748
3833
  }
3749
3834
  function reset($this) {
3750
- $this.rp_1 = null;
3835
+ $this.sp_1 = null;
3751
3836
  var tmp = $this;
3752
3837
  // Inline function 'kotlin.collections.mutableMapOf' call
3753
- tmp.qp_1 = LinkedHashMap.v8();
3838
+ tmp.rp_1 = LinkedHashMap.v8();
3754
3839
  }
3755
3840
  function malformedPgn($this) {
3756
- return 'malformed pgn at line ' + $this.pp_1.np_1 + ' token ' + $this.pp_1.mp_1;
3841
+ return 'malformed pgn at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.np_1;
3757
3842
  }
3758
3843
  function nextTokenOrFail($this, failMsg) {
3759
3844
  var tmp;
3760
- if ($this.sp_1.z()) {
3761
- tmp = $this.sp_1.a1();
3845
+ if ($this.tp_1.z()) {
3846
+ tmp = $this.tp_1.a1();
3762
3847
  } else {
3763
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(failMsg));
3848
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(failMsg));
3764
3849
  }
3765
3850
  return tmp;
3766
3851
  }
3767
3852
  function malformedTag($this) {
3768
- return 'malformed tag at line ' + $this.pp_1.np_1 + ' token ' + $this.pp_1.mp_1;
3853
+ return 'malformed tag at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.np_1;
3769
3854
  }
3770
3855
  function parseTag($this) {
3771
- $this.pp_1 = nextTokenOrFail($this, malformedTag($this));
3772
- if (!$this.pp_1.lp_1.equals(TokenType_SYMBOL_getInstance())) {
3773
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedTag($this)));
3856
+ $this.qp_1 = nextTokenOrFail($this, malformedTag($this));
3857
+ if (!$this.qp_1.mp_1.equals(TokenType_SYMBOL_getInstance())) {
3858
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
3774
3859
  }
3775
3860
  // Inline function 'kotlin.text.lowercase' call
3776
3861
  // Inline function 'kotlin.js.asDynamic' call
3777
- var tagName = $this.pp_1.mp_1.toLowerCase();
3862
+ var tagName = $this.qp_1.np_1.toLowerCase();
3778
3863
  if (tagName === 'eco') {
3779
3864
  tagName = 'ECO';
3780
3865
  }
3781
- $this.pp_1 = nextTokenOrFail($this, malformedTag($this));
3782
- if (!$this.pp_1.lp_1.equals(TokenType_STRING_getInstance())) {
3783
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedTag($this)));
3866
+ $this.qp_1 = nextTokenOrFail($this, malformedTag($this));
3867
+ if (!$this.qp_1.mp_1.equals(TokenType_STRING_getInstance())) {
3868
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
3784
3869
  }
3785
- var tagValue = $this.pp_1.mp_1;
3786
- var tmp0 = $this.qp_1;
3870
+ var tagValue = $this.qp_1.np_1;
3871
+ var tmp0 = $this.rp_1;
3787
3872
  // Inline function 'kotlin.collections.set' call
3788
3873
  var key = tagName;
3789
3874
  tmp0.f5(key, tagValue);
3790
- $this.pp_1 = nextTokenOrFail($this, malformedTag($this));
3791
- if ($this.pp_1.lp_1.equals(TokenType_RBRACKET_getInstance())) {
3792
- $this.pp_1 = nextTokenOrFail($this, malformedTag($this));
3875
+ $this.qp_1 = nextTokenOrFail($this, malformedTag($this));
3876
+ if ($this.qp_1.mp_1.equals(TokenType_RBRACKET_getInstance())) {
3877
+ $this.qp_1 = nextTokenOrFail($this, malformedTag($this));
3793
3878
  return Unit_instance;
3794
3879
  } else {
3795
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedTag($this)));
3880
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
3796
3881
  }
3797
3882
  }
3798
3883
  function malformedMoveText($this) {
3799
- return 'malformed move text at line ' + $this.pp_1.np_1 + ' token ' + $this.pp_1.toString();
3884
+ return 'malformed move text at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.toString();
3800
3885
  }
3801
3886
  function parseMoves($this, node) {
3802
3887
  var move = null;
@@ -3805,12 +3890,12 @@ function parseMoves($this, node) {
3805
3890
  var endLineComment = null;
3806
3891
  // Inline function 'kotlin.collections.mutableListOf' call
3807
3892
  var suffixAnnotations = ArrayList.h1();
3808
- if ($this.pp_1.lp_1.equals(TokenType_LPAREN_getInstance())) {
3809
- $this.pp_1 = nextTokenOrFail($this, malformedMoveText($this));
3893
+ if ($this.qp_1.mp_1.equals(TokenType_LPAREN_getInstance())) {
3894
+ $this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
3810
3895
  var tmp0_elvis_lhs = node.aj();
3811
3896
  var tmp;
3812
3897
  if (tmp0_elvis_lhs == null) {
3813
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp('node ' + toString_0(node.rk()) + ' has no parent'));
3898
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp('node ' + toString_0(node.rk()) + ' has no parent'));
3814
3899
  } else {
3815
3900
  tmp = tmp0_elvis_lhs;
3816
3901
  }
@@ -3818,45 +3903,45 @@ function parseMoves($this, node) {
3818
3903
  }
3819
3904
  while (move == null) {
3820
3905
  var tokenCounter = 0;
3821
- switch ($this.pp_1.lp_1.m2_1) {
3906
+ switch ($this.qp_1.mp_1.m2_1) {
3822
3907
  case 10:
3823
3908
  break;
3824
3909
  case 4:
3825
3910
  break;
3826
3911
  case 11:
3827
- initialComment = $this.pp_1.mp_1;
3912
+ initialComment = $this.qp_1.np_1;
3828
3913
  break;
3829
3914
  case 9:
3830
- move = $this.pp_1.mp_1;
3915
+ move = $this.qp_1.np_1;
3831
3916
  break;
3832
3917
  default:
3833
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedMoveText($this)));
3918
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
3834
3919
  }
3835
- $this.pp_1 = nextTokenOrFail($this, malformedMoveText($this));
3920
+ $this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
3836
3921
  tokenCounter = tokenCounter + 1 | 0;
3837
3922
  if (tokenCounter > 10) {
3838
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedMoveText($this)));
3923
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
3839
3924
  }
3840
3925
  }
3841
- $l$loop_0: while (!$this.pp_1.lp_1.equals(TokenType_INTEGER_getInstance()) && !$this.pp_1.lp_1.equals(TokenType_SYMBOL_getInstance()) && !$this.pp_1.lp_1.equals(TokenType_RESULT_getInstance()) && !$this.pp_1.lp_1.equals(TokenType_STAR_getInstance())) {
3842
- switch ($this.pp_1.lp_1.m2_1) {
3926
+ $l$loop_0: while (!$this.qp_1.mp_1.equals(TokenType_INTEGER_getInstance()) && !$this.qp_1.mp_1.equals(TokenType_SYMBOL_getInstance()) && !$this.qp_1.mp_1.equals(TokenType_RESULT_getInstance()) && !$this.qp_1.mp_1.equals(TokenType_STAR_getInstance())) {
3927
+ switch ($this.qp_1.mp_1.m2_1) {
3843
3928
  case 11:
3844
- comment = $this.pp_1.mp_1;
3929
+ comment = $this.qp_1.np_1;
3845
3930
  break;
3846
3931
  case 12:
3847
- endLineComment = $this.pp_1.mp_1;
3932
+ endLineComment = $this.qp_1.np_1;
3848
3933
  break;
3849
3934
  case 5:
3850
- suffixAnnotations.k(toInt($this.pp_1.mp_1));
3935
+ suffixAnnotations.k(toInt($this.qp_1.np_1));
3851
3936
  break;
3852
3937
  case 2:
3853
3938
  break $l$loop_0;
3854
3939
  case 3:
3855
3940
  break $l$loop_0;
3856
3941
  default:
3857
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedMoveText($this)));
3942
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
3858
3943
  }
3859
- $this.pp_1 = nextTokenOrFail($this, malformedMoveText($this));
3944
+ $this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
3860
3945
  }
3861
3946
  var tmp_0 = move;
3862
3947
  var tmp_1 = initialComment;
@@ -3872,7 +3957,7 @@ function parseMoves($this, node) {
3872
3957
  var tmp$ret$2 = tmp_4;
3873
3958
  var nextNode = node.wk(tmp_0, tmp_1, tmp_2, tmp_3, tmp$ret$2);
3874
3959
  var tmp_5;
3875
- switch ($this.pp_1.lp_1.m2_1) {
3960
+ switch ($this.qp_1.mp_1.m2_1) {
3876
3961
  case 10:
3877
3962
  tmp_5 = parseMoves($this, nextNode);
3878
3963
  break;
@@ -3880,12 +3965,12 @@ function parseMoves($this, node) {
3880
3965
  tmp_5 = parseMoves($this, nextNode);
3881
3966
  break;
3882
3967
  case 2:
3883
- $this.pp_1 = nextTokenOrFail($this, malformedMoveText($this));
3968
+ $this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
3884
3969
  parseMoves($this, node);
3885
3970
  tmp_5 = parseMoves($this, nextNode);
3886
3971
  break;
3887
3972
  case 3:
3888
- $this.pp_1 = nextTokenOrFail($this, malformedMoveText($this));
3973
+ $this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
3889
3974
  return nextNode;
3890
3975
  case 7:
3891
3976
  tmp_5 = nextNode;
@@ -3894,21 +3979,21 @@ function parseMoves($this, node) {
3894
3979
  tmp_5 = nextNode;
3895
3980
  break;
3896
3981
  default:
3897
- throw Companion_getInstance_3().gp_1.xl(ParserException.kp(malformedMoveText($this)));
3982
+ throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
3898
3983
  }
3899
3984
  return tmp_5;
3900
3985
  }
3901
3986
  function *_generator_invoke__zhh2q8_1($this, $this$sequence, $completion) {
3902
- var tmp = $this$sequence.wd($this.vp_1.en(), $completion);
3987
+ var tmp = $this$sequence.wd($this.wp_1.fn(), $completion);
3903
3988
  if (tmp === get_COROUTINE_SUSPENDED())
3904
3989
  tmp = yield tmp;
3905
- var tmp_0 = $this$sequence.wd($this.vp_1.wp(), $completion);
3990
+ var tmp_0 = $this$sequence.wd($this.wp_1.xp(), $completion);
3906
3991
  if (tmp_0 === get_COROUTINE_SUSPENDED())
3907
3992
  tmp_0 = yield tmp_0;
3908
- var tmp_1 = $this$sequence.wd($this.vp_1.xp(), $completion);
3993
+ var tmp_1 = $this$sequence.wd($this.wp_1.yp(), $completion);
3909
3994
  if (tmp_1 === get_COROUTINE_SUSPENDED())
3910
3995
  tmp_1 = yield tmp_1;
3911
- var tmp0_safe_receiver = $this.vp_1.yp();
3996
+ var tmp0_safe_receiver = $this.wp_1.zp();
3912
3997
  if (tmp0_safe_receiver == null)
3913
3998
  null;
3914
3999
  else {
@@ -3920,47 +4005,47 @@ function *_generator_invoke__zhh2q8_1($this, $this$sequence, $completion) {
3920
4005
  return Unit_instance;
3921
4006
  }
3922
4007
  function PawnMoves$regularMovesList$delegate$lambda$lambda(this$0) {
3923
- return (it) => this$0.qo_1(this$0.ko_1, countTrailingZeroBits(it));
4008
+ return (it) => this$0.ro_1(this$0.lo_1, countTrailingZeroBits(it));
3924
4009
  }
3925
4010
  function PawnMoves$regularMovesList$delegate$lambda(this$0) {
3926
- return () => bitboardToList(this$0.mo_1, PawnMoves$regularMovesList$delegate$lambda$lambda(this$0));
4011
+ return () => bitboardToList(this$0.no_1, PawnMoves$regularMovesList$delegate$lambda$lambda(this$0));
3927
4012
  }
3928
4013
  function PawnMoves$_get_regularMovesList_$ref_qve2sg() {
3929
- return (p0) => p0.en();
4014
+ return (p0) => p0.fn();
3930
4015
  }
3931
4016
  function PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0) {
3932
- return (it) => this$0.qo_1(this$0.ko_1, countTrailingZeroBits(it));
4017
+ return (it) => this$0.ro_1(this$0.lo_1, countTrailingZeroBits(it));
3933
4018
  }
3934
4019
  function PawnMoves$advanceEpMovesList$delegate$lambda(this$0) {
3935
- return () => bitboardToList(this$0.no_1, PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0));
4020
+ return () => bitboardToList(this$0.oo_1, PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0));
3936
4021
  }
3937
4022
  function PawnMoves$_get_advanceEpMovesList_$ref_k5ega7() {
3938
- return (p0) => p0.wp();
4023
+ return (p0) => p0.xp();
3939
4024
  }
3940
4025
  function PawnMoves$promotionMovesList$delegate$lambda$lambda$lambda(this$0, $move) {
3941
- return (it) => this$0.ro_1(this$0.ko_1, countTrailingZeroBits($move), it.m2_1);
4026
+ return (it) => this$0.so_1(this$0.lo_1, countTrailingZeroBits($move), it.m2_1);
3942
4027
  }
3943
4028
  function PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0) {
3944
4029
  return (move) => {
3945
- var tmp = this$0.jo_1 === Piece_WP_getInstance().m2_1 ? sequenceOf([Piece_WQ_getInstance(), Piece_WR_getInstance(), Piece_WB_getInstance(), Piece_WN_getInstance()]) : sequenceOf([Piece_BQ_getInstance(), Piece_BR_getInstance(), Piece_BB_getInstance(), Piece_BN_getInstance()]);
4030
+ var tmp = this$0.ko_1 === Piece_WP_getInstance().m2_1 ? sequenceOf([Piece_WQ_getInstance(), Piece_WR_getInstance(), Piece_WB_getInstance(), Piece_WN_getInstance()]) : sequenceOf([Piece_BQ_getInstance(), Piece_BR_getInstance(), Piece_BB_getInstance(), Piece_BN_getInstance()]);
3946
4031
  return toList(map(tmp, PawnMoves$promotionMovesList$delegate$lambda$lambda$lambda(this$0, move)));
3947
4032
  };
3948
4033
  }
3949
4034
  function PawnMoves$promotionMovesList$delegate$lambda(this$0) {
3950
- return () => bitboardToCollectedList(this$0.oo_1, PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0));
4035
+ return () => bitboardToCollectedList(this$0.po_1, PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0));
3951
4036
  }
3952
4037
  function PawnMoves$_get_promotionMovesList_$ref_pb8487() {
3953
- return (p0) => p0.xp();
4038
+ return (p0) => p0.yp();
3954
4039
  }
3955
4040
  function PawnMoves$epCaptureMove$delegate$lambda(this$0) {
3956
- return () => !(this$0.po_1 === 0n) ? moveOf(this$0.ko_1, countTrailingZeroBits(this$0.po_1)) : null;
4041
+ return () => !(this$0.qo_1 === 0n) ? moveOf(this$0.lo_1, countTrailingZeroBits(this$0.qo_1)) : null;
3957
4042
  }
3958
4043
  function PawnMoves$_get_epCaptureMove_$ref_4vz7gq() {
3959
- return (p0) => p0.yp();
4044
+ return (p0) => p0.zp();
3960
4045
  }
3961
4046
  function PawnMoves$allMovesList$delegate$lambda$slambda_0(this$0) {
3962
4047
  var i = new PawnMoves$allMovesList$delegate$lambda$slambda(this$0);
3963
- var l = ($this$sequence, $completion) => i.gn($this$sequence, $completion);
4048
+ var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
3964
4049
  l.$arity = 1;
3965
4050
  return l;
3966
4051
  }
@@ -3968,7 +4053,7 @@ function PawnMoves$allMovesList$delegate$lambda(this$0) {
3968
4053
  return () => toList(sequence(PawnMoves$allMovesList$delegate$lambda$slambda_0(this$0)));
3969
4054
  }
3970
4055
  function PawnMoves$_get_allMovesList_$ref_s0vg9x() {
3971
- return (p0) => p0.hn();
4056
+ return (p0) => p0.in();
3972
4057
  }
3973
4058
  var Piece_EMPTY_instance;
3974
4059
  var Piece_WP_instance;
@@ -4115,46 +4200,46 @@ function _get_moves__e5my0h($this) {
4115
4200
  return tmp0.h2();
4116
4201
  }
4117
4202
  function Position$moves$delegate$lambda(this$0) {
4118
- return () => this$0.dq().ep();
4203
+ return () => this$0.eq().fp();
4119
4204
  }
4120
4205
  function Position$_get_moves_$ref_1wr6hp() {
4121
4206
  return (p0) => _get_moves__e5my0h(p0);
4122
4207
  }
4123
4208
  function Position$check$delegate$lambda(this$0) {
4124
- return () => inCheck(this$0.eq(), this$0.fj_1);
4209
+ return () => inCheck(this$0.fq(), this$0.fj_1);
4125
4210
  }
4126
4211
  function Position$_get_check_$ref_tp97h() {
4127
- return (p0) => p0.fq();
4212
+ return (p0) => p0.gq();
4128
4213
  }
4129
4214
  function Position$checkmate$delegate$lambda(this$0) {
4130
- return () => isCheckmate(this$0.eq(), this$0.fj_1, _get_moves__e5my0h(this$0));
4215
+ return () => isCheckmate(this$0.fq(), this$0.fj_1, _get_moves__e5my0h(this$0));
4131
4216
  }
4132
4217
  function Position$_get_checkmate_$ref_mwt4hk() {
4133
- return (p0) => p0.gq();
4218
+ return (p0) => p0.hq();
4134
4219
  }
4135
4220
  function Position$stalemate$delegate$lambda(this$0) {
4136
- return () => isStalemate(this$0.eq(), this$0.fj_1, _get_moves__e5my0h(this$0));
4221
+ return () => isStalemate(this$0.fq(), this$0.fj_1, _get_moves__e5my0h(this$0));
4137
4222
  }
4138
4223
  function Position$_get_stalemate_$ref_l6lqf() {
4139
- return (p0) => p0.hq();
4224
+ return (p0) => p0.iq();
4140
4225
  }
4141
4226
  function Position$lackOfMaterial$delegate$lambda(this$0) {
4142
- return () => isLackOfMaterial(this$0.eq());
4227
+ return () => isLackOfMaterial(this$0.fq());
4143
4228
  }
4144
4229
  function Position$_get_lackOfMaterial_$ref_whrjuu() {
4145
- return (p0) => p0.iq();
4230
+ return (p0) => p0.jq();
4146
4231
  }
4147
4232
  function Position$fiftyMoves$delegate$lambda(this$0) {
4148
4233
  return () => this$0.mj_1 >= 50;
4149
4234
  }
4150
4235
  function Position$_get_fiftyMoves_$ref_ima66z() {
4151
- return (p0) => p0.rm();
4236
+ return (p0) => p0.sm();
4152
4237
  }
4153
4238
  function Position$zobrist$delegate$lambda(this$0) {
4154
- return () => get_computeZobristHash()(this$0.eq(), this$0.fj_1, this$0.hj_1, this$0.ij_1, this$0.jj_1, this$0.kj_1, this$0.gj_1);
4239
+ return () => get_computeZobristHash()(this$0.fq(), this$0.fj_1, this$0.hj_1, this$0.ij_1, this$0.jj_1, this$0.kj_1, this$0.gj_1);
4155
4240
  }
4156
4241
  function Position$_get_zobrist_$ref_t8al0g() {
4157
- return (p0) => p0.jq();
4242
+ return (p0) => p0.kq();
4158
4243
  }
4159
4244
  function init_io_github_lunalobos_chess4kt_Position(_this__u8e3s4) {
4160
4245
  Companion_getInstance_5();
@@ -4174,13 +4259,13 @@ function init_io_github_lunalobos_chess4kt_Position(_this__u8e3s4) {
4174
4259
  tmp_5.tj_1 = lazy(Position$zobrist$delegate$lambda(_this__u8e3s4));
4175
4260
  }
4176
4261
  function RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0) {
4177
- return (it) => this$0.cp_1(this$0.zo_1, countTrailingZeroBits(it));
4262
+ return (it) => this$0.dp_1(this$0.ap_1, countTrailingZeroBits(it));
4178
4263
  }
4179
4264
  function RegularPieceMoves$allMovesList$delegate$lambda(this$0) {
4180
- return () => bitboardToList(this$0.bp_1, RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0));
4265
+ return () => bitboardToList(this$0.cp_1, RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0));
4181
4266
  }
4182
4267
  function RegularPieceMoves$_get_allMovesList_$ref_ts1d8v() {
4183
- return (p0) => p0.hn();
4268
+ return (p0) => p0.in();
4184
4269
  }
4185
4270
  var Side_WHITE_instance;
4186
4271
  var Side_BLACK_instance;
@@ -4843,36 +4928,36 @@ function addToken($this, type, value) {
4843
4928
  var tmp;
4844
4929
  // Inline function 'kotlin.text.isEmpty' call
4845
4930
  if (charSequenceLength(value) === 0) {
4846
- tmp = toString_1(charCodeAt($this.pq_1, $this.qq_1));
4931
+ tmp = toString_1(charCodeAt($this.qq_1, $this.rq_1));
4847
4932
  } else {
4848
4933
  tmp = value;
4849
4934
  }
4850
4935
  var tmp$ret$2 = tmp;
4851
- $this.sq_1.k(new Token(type, tmp$ret$2, $this.rq_1));
4852
- $this.qq_1 = $this.qq_1 + 1 | 0;
4936
+ $this.tq_1.k(new Token(type, tmp$ret$2, $this.sq_1));
4937
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4853
4938
  }
4854
4939
  function addToken$default($this, type, value, $super) {
4855
4940
  value = value === VOID ? '' : value;
4856
4941
  return addToken($this, type, value);
4857
4942
  }
4858
4943
  function consumeWhitespace($this) {
4859
- while ($this.qq_1 < $this.pq_1.length && isWhitespace(charCodeAt($this.pq_1, $this.qq_1))) {
4860
- if (charCodeAt($this.pq_1, $this.qq_1) === _Char___init__impl__6a9atx(10)) {
4861
- $this.rq_1 = $this.rq_1 + 1 | 0;
4944
+ while ($this.rq_1 < $this.qq_1.length && isWhitespace(charCodeAt($this.qq_1, $this.rq_1))) {
4945
+ if (charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(10)) {
4946
+ $this.sq_1 = $this.sq_1 + 1 | 0;
4862
4947
  }
4863
- $this.qq_1 = $this.qq_1 + 1 | 0;
4948
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4864
4949
  }
4865
4950
  }
4866
4951
  function consumeString($this) {
4867
- $this.qq_1 = $this.qq_1 + 1 | 0;
4868
- var start = $this.qq_1;
4952
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4953
+ var start = $this.rq_1;
4869
4954
  var value = '';
4870
- while ($this.qq_1 < $this.pq_1.length) {
4871
- var char = charCodeAt($this.pq_1, $this.qq_1);
4955
+ while ($this.rq_1 < $this.qq_1.length) {
4956
+ var char = charCodeAt($this.qq_1, $this.rq_1);
4872
4957
  if (char === _Char___init__impl__6a9atx(34)) {
4873
- value = substring_0($this.pq_1, start, $this.qq_1);
4874
- $this.qq_1 = $this.qq_1 + 1 | 0;
4875
- $this.sq_1.k(new Token(TokenType_STRING_getInstance(), value, $this.rq_1));
4958
+ value = substring_0($this.qq_1, start, $this.rq_1);
4959
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4960
+ $this.tq_1.k(new Token(TokenType_STRING_getInstance(), value, $this.sq_1));
4876
4961
  return Unit_instance;
4877
4962
  }
4878
4963
  var tmp;
@@ -4884,76 +4969,76 @@ function consumeString($this) {
4884
4969
  }
4885
4970
  if (tmp) {
4886
4971
  if (char === _Char___init__impl__6a9atx(10)) {
4887
- $this.rq_1 = $this.rq_1 + 1 | 0;
4972
+ $this.sq_1 = $this.sq_1 + 1 | 0;
4888
4973
  }
4889
4974
  }
4890
- $this.qq_1 = $this.qq_1 + 1 | 0;
4975
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4891
4976
  }
4892
- throw ParserException.kp('Unclosed string literal.');
4977
+ throw ParserException.lp('Unclosed string literal.');
4893
4978
  }
4894
4979
  function consumeBraceComment($this) {
4895
- var start = $this.qq_1;
4896
- $this.qq_1 = $this.qq_1 + 1 | 0;
4897
- while ($this.qq_1 < $this.pq_1.length && !(charCodeAt($this.pq_1, $this.qq_1) === _Char___init__impl__6a9atx(125))) {
4898
- if (charCodeAt($this.pq_1, $this.qq_1) === _Char___init__impl__6a9atx(10)) {
4899
- $this.rq_1 = $this.rq_1 + 1 | 0;
4980
+ var start = $this.rq_1;
4981
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4982
+ while ($this.rq_1 < $this.qq_1.length && !(charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(125))) {
4983
+ if (charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(10)) {
4984
+ $this.sq_1 = $this.sq_1 + 1 | 0;
4900
4985
  }
4901
- $this.qq_1 = $this.qq_1 + 1 | 0;
4986
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4902
4987
  }
4903
- if ($this.qq_1 < $this.pq_1.length) {
4904
- $this.qq_1 = $this.qq_1 + 1 | 0;
4988
+ if ($this.rq_1 < $this.qq_1.length) {
4989
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4905
4990
  }
4906
4991
  var tmp = TokenType_COMMENT_getInstance();
4907
4992
  // Inline function 'kotlin.text.trim' call
4908
- var this_0 = substring_0($this.pq_1, start + 1 | 0, ($this.qq_1 - 1 | 0) >= (start + 1 | 0) ? $this.qq_1 - 1 | 0 : start + 1 | 0);
4993
+ var this_0 = substring_0($this.qq_1, start + 1 | 0, ($this.rq_1 - 1 | 0) >= (start + 1 | 0) ? $this.rq_1 - 1 | 0 : start + 1 | 0);
4909
4994
  var tmp$ret$0 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
4910
- $this.sq_1.k(new Token(tmp, tmp$ret$0, $this.rq_1));
4995
+ $this.tq_1.k(new Token(tmp, tmp$ret$0, $this.sq_1));
4911
4996
  }
4912
4997
  function consumeSemicolonComment($this) {
4913
- var start = $this.qq_1;
4914
- while ($this.qq_1 < $this.pq_1.length && !(charCodeAt($this.pq_1, $this.qq_1) === _Char___init__impl__6a9atx(10)) && !(charCodeAt($this.pq_1, $this.qq_1) === _Char___init__impl__6a9atx(13))) {
4915
- $this.qq_1 = $this.qq_1 + 1 | 0;
4998
+ var start = $this.rq_1;
4999
+ while ($this.rq_1 < $this.qq_1.length && !(charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(10)) && !(charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(13))) {
5000
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4916
5001
  }
4917
5002
  var tmp = TokenType_END_LINE_COMMENT_getInstance();
4918
5003
  // Inline function 'kotlin.text.trim' call
4919
- var this_0 = substring_0($this.pq_1, start + 1 | 0, $this.qq_1 - 1 | 0);
5004
+ var this_0 = substring_0($this.qq_1, start + 1 | 0, $this.rq_1 - 1 | 0);
4920
5005
  var tmp$ret$0 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
4921
- $this.sq_1.k(new Token(tmp, tmp$ret$0, $this.rq_1));
5006
+ $this.tq_1.k(new Token(tmp, tmp$ret$0, $this.sq_1));
4922
5007
  }
4923
5008
  function consumeNAG($this) {
4924
- $this.qq_1 = $this.qq_1 + 1 | 0;
4925
- var start = $this.qq_1;
4926
- while ($this.qq_1 < $this.pq_1.length && isDigit(charCodeAt($this.pq_1, $this.qq_1))) {
4927
- $this.qq_1 = $this.qq_1 + 1 | 0;
5009
+ $this.rq_1 = $this.rq_1 + 1 | 0;
5010
+ var start = $this.rq_1;
5011
+ while ($this.rq_1 < $this.qq_1.length && isDigit(charCodeAt($this.qq_1, $this.rq_1))) {
5012
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4928
5013
  }
4929
- $this.sq_1.k(new Token(TokenType_NAG_getInstance(), substring_0($this.pq_1, start, $this.qq_1), $this.rq_1));
5014
+ $this.tq_1.k(new Token(TokenType_NAG_getInstance(), substring_0($this.qq_1, start, $this.rq_1), $this.sq_1));
4930
5015
  }
4931
5016
  function consumeNumberOrSymbol($this) {
4932
- var start = $this.qq_1;
4933
- var currentPos = $this.qq_1;
4934
- while (currentPos < $this.pq_1.length && isDigit(charCodeAt($this.pq_1, currentPos))) {
5017
+ var start = $this.rq_1;
5018
+ var currentPos = $this.rq_1;
5019
+ while (currentPos < $this.qq_1.length && isDigit(charCodeAt($this.qq_1, currentPos))) {
4935
5020
  currentPos = currentPos + 1 | 0;
4936
5021
  }
4937
- if (currentPos < $this.pq_1.length && charCodeAt($this.pq_1, currentPos) === _Char___init__impl__6a9atx(46)) {
4938
- $this.qq_1 = currentPos;
4939
- $this.sq_1.k(new Token(TokenType_INTEGER_getInstance(), substring_0($this.pq_1, start, $this.qq_1), $this.rq_1));
5022
+ if (currentPos < $this.qq_1.length && charCodeAt($this.qq_1, currentPos) === _Char___init__impl__6a9atx(46)) {
5023
+ $this.rq_1 = currentPos;
5024
+ $this.tq_1.k(new Token(TokenType_INTEGER_getInstance(), substring_0($this.qq_1, start, $this.rq_1), $this.sq_1));
4940
5025
  } else {
4941
- $this.qq_1 = start;
5026
+ $this.rq_1 = start;
4942
5027
  consumeSymbol($this);
4943
5028
  }
4944
5029
  }
4945
5030
  function consumeSymbol($this) {
4946
- var start = $this.qq_1;
4947
- $l$loop: while ($this.qq_1 < $this.pq_1.length) {
4948
- var char = charCodeAt($this.pq_1, $this.qq_1);
5031
+ var start = $this.rq_1;
5032
+ $l$loop: while ($this.rq_1 < $this.qq_1.length) {
5033
+ var char = charCodeAt($this.qq_1, $this.rq_1);
4949
5034
  var isSymbolContinuation = isLetterOrDigit(char) || char === _Char___init__impl__6a9atx(95) || char === _Char___init__impl__6a9atx(43) || char === _Char___init__impl__6a9atx(35) || char === _Char___init__impl__6a9atx(61) || char === _Char___init__impl__6a9atx(58) || char === _Char___init__impl__6a9atx(45) || char === _Char___init__impl__6a9atx(47);
4950
5035
  if (isSymbolContinuation) {
4951
- $this.qq_1 = $this.qq_1 + 1 | 0;
5036
+ $this.rq_1 = $this.rq_1 + 1 | 0;
4952
5037
  } else {
4953
5038
  break $l$loop;
4954
5039
  }
4955
5040
  }
4956
- var value = substring_0($this.pq_1, start, $this.qq_1);
5041
+ var value = substring_0($this.qq_1, start, $this.rq_1);
4957
5042
  var type;
4958
5043
  switch (value) {
4959
5044
  case '1-0':
@@ -4965,7 +5050,7 @@ function consumeSymbol($this) {
4965
5050
  type = TokenType_SYMBOL_getInstance();
4966
5051
  break;
4967
5052
  }
4968
- $this.sq_1.k(new Token(type, value, $this.rq_1));
5053
+ $this.tq_1.k(new Token(type, value, $this.sq_1));
4969
5054
  }
4970
5055
  function yieldBishopMoves(visibleSquaresBishop, moveFunction) {
4971
5056
  return yieldBishopMoves$lambda(visibleSquaresBishop, moveFunction);
@@ -5545,6 +5630,42 @@ function moveOf_2(move) {
5545
5630
  _init_properties_factory_kt__5kmpyw();
5546
5631
  return get_moveFromString()(move);
5547
5632
  }
5633
+ function visibleSquares_0(piece, square, position) {
5634
+ _init_properties_factory_kt__5kmpyw();
5635
+ var tmp;
5636
+ switch (piece.m2_1) {
5637
+ case 1:
5638
+ tmp = get_visibleSquaresWhitePawn()(square.m2_1, get_friends(position));
5639
+ break;
5640
+ case 2:
5641
+ case 8:
5642
+ tmp = get_visibleSquaresKnight()(square.m2_1, get_friends(position));
5643
+ break;
5644
+ case 3:
5645
+ case 9:
5646
+ tmp = get_visibleSquaresBishop()(square.m2_1, get_friends(position), get_enemies(position));
5647
+ break;
5648
+ case 4:
5649
+ case 10:
5650
+ tmp = get_visibleSquaresRook()(square.m2_1, get_friends(position), get_enemies(position));
5651
+ break;
5652
+ case 5:
5653
+ case 11:
5654
+ tmp = get_visibleSquaresQueen()(square.m2_1, get_friends(position), get_enemies(position));
5655
+ break;
5656
+ case 6:
5657
+ case 12:
5658
+ tmp = get_visibleSquaresKing()(square.m2_1, get_friends(position));
5659
+ break;
5660
+ case 7:
5661
+ tmp = get_visibleSquaresBlackPawn()(square.m2_1, get_friends(position));
5662
+ break;
5663
+ default:
5664
+ var message = 'Invalid piece ' + piece.toString();
5665
+ throw IllegalStateException.e3(toString(message));
5666
+ }
5667
+ return tmp;
5668
+ }
5548
5669
  function positionOf() {
5549
5670
  _init_properties_factory_kt__5kmpyw();
5550
5671
  return get_startpos();
@@ -5568,7 +5689,7 @@ function strictMatch(idSupplier) {
5568
5689
  _init_properties_factory_kt__5kmpyw();
5569
5690
  // Inline function 'kotlin.collections.mutableMapOf' call
5570
5691
  var tmp$ret$0 = LinkedHashMap.v8();
5571
- return Game.qm(tmp$ret$0, GameMode_MATCH_getInstance(), ThreeRepetitionsMode_STRICT_getInstance(), FiftyMovesRuleMode_STRICT_getInstance(), idSupplier);
5692
+ return Game.rm(tmp$ret$0, GameMode_MATCH_getInstance(), ThreeRepetitionsMode_STRICT_getInstance(), FiftyMovesRuleMode_STRICT_getInstance(), idSupplier);
5572
5693
  }
5573
5694
  function analysisGame(idSupplier) {
5574
5695
  var tmp;
@@ -5581,7 +5702,7 @@ function analysisGame(idSupplier) {
5581
5702
  _init_properties_factory_kt__5kmpyw();
5582
5703
  // Inline function 'kotlin.collections.mutableMapOf' call
5583
5704
  var tmp$ret$0 = LinkedHashMap.v8();
5584
- return Game.qm(tmp$ret$0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), idSupplier);
5705
+ return Game.rm(tmp$ret$0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), idSupplier);
5585
5706
  }
5586
5707
  function customGame(gameMode, threeRepetitionsMode, fiftyMovesRuleMode, initialFen, initialTags, idSupplier) {
5587
5708
  initialFen = initialFen === VOID ? null : initialFen;
@@ -5609,7 +5730,7 @@ function customGame(gameMode, threeRepetitionsMode, fiftyMovesRuleMode, initialF
5609
5730
  // Inline function 'kotlin.collections.set' call
5610
5731
  tags.f5('fen', initialFen);
5611
5732
  }
5612
- return Game.qm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier);
5733
+ return Game.rm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier);
5613
5734
  }
5614
5735
  function parseGames(pgnInput, idSupplier) {
5615
5736
  var tmp;
@@ -5621,9 +5742,9 @@ function parseGames(pgnInput, idSupplier) {
5621
5742
  idSupplier = tmp;
5622
5743
  _init_properties_factory_kt__5kmpyw();
5623
5744
  var tokenizer = new Tokenizer(pgnInput);
5624
- var tokens = tokenizer.tq();
5745
+ var tokens = tokenizer.uq();
5625
5746
  var parser = new Parser(tokens);
5626
- var games = parser.up(idSupplier);
5747
+ var games = parser.vp(idSupplier);
5627
5748
  return games;
5628
5749
  }
5629
5750
  function movesMap$lambda(it) {
@@ -5738,7 +5859,7 @@ function threats$lambda($visibleSquaresKing, $calculators, $visibleSquaresKnight
5738
5859
  }
5739
5860
  function eco$lambda(fen) {
5740
5861
  _init_properties_factory_kt__5kmpyw();
5741
- return Position.oq(fen);
5862
+ return Position.pq(fen);
5742
5863
  }
5743
5864
  function strictMatch$lambda() {
5744
5865
  _init_properties_factory_kt__5kmpyw();
@@ -5849,7 +5970,7 @@ function _init_properties_factory_kt__5kmpyw() {
5849
5970
  checkInfo = yieldCheckInfo(get_visibleSquares());
5850
5971
  checkMask = yieldCheckMask(get_visibleSquares());
5851
5972
  movesInfo = yieldMovesInfo(get_pawnMoves(), get_knightMoves(), get_bishopMoves(), get_rookMoves(), get_queenMoves(), get_kingMoves(), get_checkMask(), get_checkInfo());
5852
- startpos = Position.mq();
5973
+ startpos = Position.nq();
5853
5974
  eco = Eco.hi(eco$lambda);
5854
5975
  }
5855
5976
  }
@@ -5864,74 +5985,74 @@ function generateChildren(mi, pos) {
5864
5985
  }
5865
5986
  function pawnTuples(mi, position, children) {
5866
5987
  // Inline function 'kotlin.collections.forEach' call
5867
- var _iterator__ex2g4s = mi.ao_1.x();
5988
+ var _iterator__ex2g4s = mi.bo_1.x();
5868
5989
  while (_iterator__ex2g4s.z()) {
5869
5990
  var element = _iterator__ex2g4s.a1();
5870
- var tmp = element.en();
5991
+ var tmp = element.fn();
5871
5992
  var tmp_0 = pawnTuples$lambda;
5872
- generateTuples(tmp, element.jo_1, element.ko_1, element.lo_1, position, children, tmp_0, pawnTuples$lambda_0);
5873
- generatePromotionTuples(element.xp(), element.jo_1, element.ko_1, position, children);
5874
- var tmp_1 = element.wp();
5993
+ generateTuples(tmp, element.ko_1, element.lo_1, element.mo_1, position, children, tmp_0, pawnTuples$lambda_0);
5994
+ generatePromotionTuples(element.yp(), element.ko_1, element.lo_1, position, children);
5995
+ var tmp_1 = element.xp();
5875
5996
  var tmp_2 = pawnTuples$lambda_1;
5876
- generateTuples(tmp_1, element.jo_1, element.ko_1, element.lo_1, position, children, tmp_2, pawnTuples$lambda_2);
5877
- var tmp0_safe_receiver = element.yp();
5997
+ generateTuples(tmp_1, element.ko_1, element.lo_1, element.mo_1, position, children, tmp_2, pawnTuples$lambda_2);
5998
+ var tmp0_safe_receiver = element.zp();
5878
5999
  if (tmp0_safe_receiver == null)
5879
6000
  null;
5880
6001
  else {
5881
6002
  // Inline function 'kotlin.let' call
5882
- generateEnPassantCaptureTuple(tmp0_safe_receiver, element.jo_1, element.ko_1, position, children);
6003
+ generateEnPassantCaptureTuple(tmp0_safe_receiver, element.ko_1, element.lo_1, position, children);
5883
6004
  }
5884
6005
  }
5885
6006
  }
5886
6007
  function knightBishopAndQueenTuples(mi, position, children) {
5887
6008
  // Inline function 'kotlin.collections.forEach' call
5888
- var _iterator__ex2g4s = mi.bo_1.x();
6009
+ var _iterator__ex2g4s = mi.co_1.x();
5889
6010
  while (_iterator__ex2g4s.z()) {
5890
6011
  var element = _iterator__ex2g4s.a1();
5891
- var tmp = element.hn();
6012
+ var tmp = element.in();
5892
6013
  var tmp_0 = knightBishopAndQueenTuples$lambda;
5893
- generateTuples(tmp, element.yo_1, element.zo_1, element.ap_1, position, children, tmp_0, knightBishopAndQueenTuples$lambda_0);
6014
+ generateTuples(tmp, element.zo_1, element.ap_1, element.bp_1, position, children, tmp_0, knightBishopAndQueenTuples$lambda_0);
5894
6015
  }
5895
6016
  // Inline function 'kotlin.collections.forEach' call
5896
- var _iterator__ex2g4s_0 = mi.co_1.x();
6017
+ var _iterator__ex2g4s_0 = mi.do_1.x();
5897
6018
  while (_iterator__ex2g4s_0.z()) {
5898
6019
  var element_0 = _iterator__ex2g4s_0.a1();
5899
- var tmp_1 = element_0.hn();
6020
+ var tmp_1 = element_0.in();
5900
6021
  var tmp_2 = knightBishopAndQueenTuples$lambda_1;
5901
- generateTuples(tmp_1, element_0.yo_1, element_0.zo_1, element_0.ap_1, position, children, tmp_2, knightBishopAndQueenTuples$lambda_2);
6022
+ generateTuples(tmp_1, element_0.zo_1, element_0.ap_1, element_0.bp_1, position, children, tmp_2, knightBishopAndQueenTuples$lambda_2);
5902
6023
  }
5903
6024
  // Inline function 'kotlin.collections.forEach' call
5904
- var _iterator__ex2g4s_1 = mi.eo_1.x();
6025
+ var _iterator__ex2g4s_1 = mi.fo_1.x();
5905
6026
  while (_iterator__ex2g4s_1.z()) {
5906
6027
  var element_1 = _iterator__ex2g4s_1.a1();
5907
- var tmp_3 = element_1.hn();
6028
+ var tmp_3 = element_1.in();
5908
6029
  var tmp_4 = knightBishopAndQueenTuples$lambda_3;
5909
- generateTuples(tmp_3, element_1.yo_1, element_1.zo_1, element_1.ap_1, position, children, tmp_4, knightBishopAndQueenTuples$lambda_4);
6030
+ generateTuples(tmp_3, element_1.zo_1, element_1.ap_1, element_1.bp_1, position, children, tmp_4, knightBishopAndQueenTuples$lambda_4);
5910
6031
  }
5911
6032
  }
5912
6033
  function rookTuples(mi, position, children) {
5913
6034
  // Inline function 'kotlin.collections.forEach' call
5914
- var _iterator__ex2g4s = mi.do_1.x();
6035
+ var _iterator__ex2g4s = mi.eo_1.x();
5915
6036
  while (_iterator__ex2g4s.z()) {
5916
6037
  var element = _iterator__ex2g4s.a1();
5917
- var tmp = element.hn();
6038
+ var tmp = element.in();
5918
6039
  var tmp_0 = rookTuples$lambda;
5919
- generateTuples(tmp, element.yo_1, element.zo_1, element.ap_1, position, children, tmp_0, rookTuples$lambda_0);
6040
+ generateTuples(tmp, element.zo_1, element.ap_1, element.bp_1, position, children, tmp_0, rookTuples$lambda_0);
5920
6041
  }
5921
6042
  }
5922
6043
  function kingTuples(mi, position, children) {
5923
- var tmp = mi.fo_1.en();
6044
+ var tmp = mi.go_1.fn();
5924
6045
  var tmp_0 = kingTuples$lambda;
5925
- generateTuples(tmp, mi.fo_1.um_1, mi.fo_1.vm_1, mi.fo_1.wm_1, position, children, tmp_0, kingTuples$lambda_0);
5926
- generateCastleTuples(mi.fo_1.fn(), mi.fo_1.um_1, mi.fo_1.vm_1, position, children);
6046
+ generateTuples(tmp, mi.go_1.vm_1, mi.go_1.wm_1, mi.go_1.xm_1, position, children, tmp_0, kingTuples$lambda_0);
6047
+ generateCastleTuples(mi.go_1.gn(), mi.go_1.vm_1, mi.go_1.wm_1, position, children);
5927
6048
  }
5928
6049
  function generateTuples(moves, pieceType, square, enemies, position, children, epFunction, castleFunction) {
5929
6050
  // Inline function 'kotlin.collections.forEach' call
5930
6051
  var _iterator__ex2g4s = moves.x();
5931
6052
  while (_iterator__ex2g4s.z()) {
5932
6053
  var element = _iterator__ex2g4s.a1();
5933
- var move = element.on_1;
5934
- var bitboards = position.eq();
6054
+ var move = element.pn_1;
6055
+ var bitboards = position.fq();
5935
6056
  var inductionVariable = 0;
5936
6057
  if (inductionVariable <= 11)
5937
6058
  do {
@@ -5953,7 +6074,7 @@ function generateTuples(moves, pieceType, square, enemies, position, children, e
5953
6074
  var isCapture = isPresent(enemies & move);
5954
6075
  var isPawnMove = isPresent(move & bitboards[(Piece_BP_getInstance().m2_1 - aux | 0) - 1 | 0]);
5955
6076
  var hm = isCapture || isPawnMove ? 0 : position.mj_1 + 1 | 0;
5956
- var tuple = tupleOf(Position.nq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm), element);
6077
+ var tuple = tupleOf(Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm), element);
5957
6078
  children.k(tuple);
5958
6079
  }
5959
6080
  }
@@ -5962,9 +6083,9 @@ function generatePromotionTuples(moves, pieceType, square, position, children) {
5962
6083
  var _iterator__ex2g4s = moves.x();
5963
6084
  while (_iterator__ex2g4s.z()) {
5964
6085
  var element = _iterator__ex2g4s.a1();
5965
- var move = element.on_1;
5966
- var promotionPiece = element.qn_1;
5967
- var bitboards = position.eq();
6086
+ var move = element.pn_1;
6087
+ var promotionPiece = element.rn_1;
6088
+ var bitboards = position.fq();
5968
6089
  var inductionVariable = 0;
5969
6090
  if (inductionVariable <= 11)
5970
6091
  do {
@@ -6020,15 +6141,15 @@ function generatePromotionTuples(moves, pieceType, square, position, children) {
6020
6141
  }
6021
6142
  var hm = 0;
6022
6143
  var ep = -1;
6023
- var newPosition = Position.nq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
6144
+ var newPosition = Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
6024
6145
  children.k(tupleOf(newPosition, element));
6025
6146
  }
6026
6147
  }
6027
6148
  function generateEnPassantCaptureTuple(m, pieceType, originSquare, position, children) {
6028
- var move = m.on_1;
6149
+ var move = m.pn_1;
6029
6150
  var whiteMove = position.fj_1;
6030
6151
  var capture = shiftLeft(1n, countTrailingZeroBits(move) + (whiteMove ? -8 : 8) | 0);
6031
- var bitboards = position.eq();
6152
+ var bitboards = position.fq();
6032
6153
  var inductionVariable = 0;
6033
6154
  if (inductionVariable <= 11)
6034
6155
  do {
@@ -6042,16 +6163,16 @@ function generateEnPassantCaptureTuple(m, pieceType, originSquare, position, chi
6042
6163
  var hm = 0;
6043
6164
  var mc = position.lj_1 + (wm ? 1 : 0) | 0;
6044
6165
  var ep = -1;
6045
- var newPosition = Position.nq(bitboards, wm, ep, position.hj_1, position.ij_1, position.jj_1, position.kj_1, mc, hm);
6046
- children.k(Tuple.uq(newPosition, m));
6166
+ var newPosition = Position.oq(bitboards, wm, ep, position.hj_1, position.ij_1, position.jj_1, position.kj_1, mc, hm);
6167
+ children.k(Tuple.vq(newPosition, m));
6047
6168
  }
6048
6169
  function generateCastleTuples(moves, kingPiece, square, position, children) {
6049
6170
  // Inline function 'kotlin.collections.forEach' call
6050
6171
  var _iterator__ex2g4s = moves.x();
6051
6172
  while (_iterator__ex2g4s.z()) {
6052
6173
  var element = _iterator__ex2g4s.a1();
6053
- var move = element.on_1;
6054
- var bitboards = position.eq();
6174
+ var move = element.pn_1;
6175
+ var bitboards = position.fq();
6055
6176
  var indexedObject = get_indexes();
6056
6177
  var inductionVariable = 0;
6057
6178
  var last = indexedObject.length;
@@ -6091,7 +6212,7 @@ function generateCastleTuples(moves, kingPiece, square, position, children) {
6091
6212
  var hm = position.mj_1 + 1 | 0;
6092
6213
  var mc = position.lj_1 + (wm ? 1 : 0) | 0;
6093
6214
  var ep = -1;
6094
- var newPosition = Position.nq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
6215
+ var newPosition = Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
6095
6216
  children.k(tupleOf(newPosition, element));
6096
6217
  }
6097
6218
  }
@@ -8784,7 +8905,7 @@ function checkCollision(move, moves) {
8784
8905
  _init_properties_moveFactory_kt__2023o9();
8785
8906
  var m = moves[move.hashCode()];
8786
8907
  if (!(m == null) && !equals(m, move)) {
8787
- throw get_logger().ln(RuntimeException.l7('hash collision for ' + m.toString() + ' and ' + move.toString()));
8908
+ throw get_logger().mn(RuntimeException.l7('hash collision for ' + m.toString() + ' and ' + move.toString()));
8788
8909
  }
8789
8910
  }
8790
8911
  function hash(origin, target) {
@@ -8836,7 +8957,7 @@ function yieldMoves() {
8836
8957
  while (inductionVariable_0 < last_0) {
8837
8958
  var item_0 = white[inductionVariable_0];
8838
8959
  inductionVariable_0 = inductionVariable_0 + 1 | 0;
8839
- var tmp$ret$13 = Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([valueOf_5(element + '8')])), valueOf_5(element + '7').m2_1, item_0.m2_1);
8960
+ var tmp$ret$13 = Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([valueOf_5(element + '8')])), valueOf_5(element + '7').m2_1, item_0.m2_1);
8840
8961
  destination_1.k(tmp$ret$13);
8841
8962
  }
8842
8963
  var list = destination_1;
@@ -8876,7 +8997,7 @@ function yieldMoves() {
8876
8997
  while (inductionVariable_2 < last_2) {
8877
8998
  var item_2 = white[inductionVariable_2];
8878
8999
  inductionVariable_2 = inductionVariable_2 + 1 | 0;
8879
- var tmp$ret$26 = Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_1 + '8').m2_1 + 1 | 0)])), valueOf_5(element_1 + '7').m2_1, item_2.m2_1);
9000
+ var tmp$ret$26 = Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_1 + '8').m2_1 + 1 | 0)])), valueOf_5(element_1 + '7').m2_1, item_2.m2_1);
8880
9001
  destination_4.k(tmp$ret$26);
8881
9002
  }
8882
9003
  var list_0 = destination_4;
@@ -8916,7 +9037,7 @@ function yieldMoves() {
8916
9037
  while (inductionVariable_4 < last_4) {
8917
9038
  var item_4 = white[inductionVariable_4];
8918
9039
  inductionVariable_4 = inductionVariable_4 + 1 | 0;
8919
- var tmp$ret$39 = Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_3 + '8').m2_1 - 1 | 0)])), valueOf_5(element_3 + '7').m2_1, item_4.m2_1);
9040
+ var tmp$ret$39 = Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_3 + '8').m2_1 - 1 | 0)])), valueOf_5(element_3 + '7').m2_1, item_4.m2_1);
8920
9041
  destination_7.k(tmp$ret$39);
8921
9042
  }
8922
9043
  var list_1 = destination_7;
@@ -8959,7 +9080,7 @@ function yieldMoves() {
8959
9080
  while (inductionVariable_6 < last_6) {
8960
9081
  var item_6 = black[inductionVariable_6];
8961
9082
  inductionVariable_6 = inductionVariable_6 + 1 | 0;
8962
- var tmp$ret$55 = Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([valueOf_5(element_5 + '1')])), valueOf_5(element_5 + '2').m2_1, item_6.m2_1);
9083
+ var tmp$ret$55 = Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([valueOf_5(element_5 + '1')])), valueOf_5(element_5 + '2').m2_1, item_6.m2_1);
8963
9084
  destination_10.k(tmp$ret$55);
8964
9085
  }
8965
9086
  var list_2 = destination_10;
@@ -8999,7 +9120,7 @@ function yieldMoves() {
8999
9120
  while (inductionVariable_8 < last_8) {
9000
9121
  var item_8 = black[inductionVariable_8];
9001
9122
  inductionVariable_8 = inductionVariable_8 + 1 | 0;
9002
- var tmp$ret$68 = Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_7 + '1').m2_1 + 1 | 0)])), valueOf_5(element_7 + '2').m2_1, item_8.m2_1);
9123
+ var tmp$ret$68 = Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_7 + '1').m2_1 + 1 | 0)])), valueOf_5(element_7 + '2').m2_1, item_8.m2_1);
9003
9124
  destination_13.k(tmp$ret$68);
9004
9125
  }
9005
9126
  var list_3 = destination_13;
@@ -9039,7 +9160,7 @@ function yieldMoves() {
9039
9160
  while (inductionVariable_10 < last_10) {
9040
9161
  var item_10 = black[inductionVariable_10];
9041
9162
  inductionVariable_10 = inductionVariable_10 + 1 | 0;
9042
- var tmp$ret$81 = Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_9 + '1').m2_1 - 1 | 0)])), valueOf_5(element_9 + '2').m2_1, item_10.m2_1);
9163
+ var tmp$ret$81 = Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(valueOf_5(element_9 + '1').m2_1 - 1 | 0)])), valueOf_5(element_9 + '2').m2_1, item_10.m2_1);
9043
9164
  destination_16.k(tmp$ret$81);
9044
9165
  }
9045
9166
  var list_4 = destination_16;
@@ -9062,7 +9183,7 @@ function yieldMoves() {
9062
9183
  var j = inductionVariable_12;
9063
9184
  inductionVariable_12 = inductionVariable_12 + 1 | 0;
9064
9185
  if (!(j === i)) {
9065
- moveList.k(Move.sn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(i)])), Companion_instance_6.c1(j).m2_1));
9186
+ moveList.k(Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(i)])), Companion_instance_6.c1(j).m2_1));
9066
9187
  }
9067
9188
  }
9068
9189
  while (inductionVariable_12 <= 63);
@@ -9102,7 +9223,7 @@ function yieldMoveFromOriginTarget$lambda($moves) {
9102
9223
  var tmp0_elvis_lhs = $moves[hash(origin, target)];
9103
9224
  var tmp;
9104
9225
  if (tmp0_elvis_lhs == null) {
9105
- throw get_logger().ln(MoveException.zn('move for origin=' + origin + ', target=' + target + ' not found'));
9226
+ throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found'));
9106
9227
  } else {
9107
9228
  tmp = tmp0_elvis_lhs;
9108
9229
  }
@@ -9116,7 +9237,7 @@ function yieldMoveFromOriginTargetPromotion$lambda($moves) {
9116
9237
  var tmp0_elvis_lhs = $moves[hash(origin, target)];
9117
9238
  var tmp_0;
9118
9239
  if (tmp0_elvis_lhs == null) {
9119
- throw get_logger().ln(MoveException.zn('move for origin=' + origin + ', target=' + target + ' not found'));
9240
+ throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found'));
9120
9241
  } else {
9121
9242
  tmp_0 = tmp0_elvis_lhs;
9122
9243
  }
@@ -9125,7 +9246,7 @@ function yieldMoveFromOriginTargetPromotion$lambda($moves) {
9125
9246
  var tmp1_elvis_lhs = $moves[hash_0(origin, target, promotionPiece)];
9126
9247
  var tmp_1;
9127
9248
  if (tmp1_elvis_lhs == null) {
9128
- throw get_logger().ln(MoveException.zn('move for origin=' + origin + ', target=' + target + ' not found, promotionPiece=' + promotionPiece));
9249
+ throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found, promotionPiece=' + promotionPiece));
9129
9250
  } else {
9130
9251
  tmp_1 = tmp1_elvis_lhs;
9131
9252
  }
@@ -9139,7 +9260,7 @@ function yieldMoveFromOriginTargetObjects$lambda($moves) {
9139
9260
  var tmp0_elvis_lhs = $moves[hash(origin.m2_1, target.m2_1)];
9140
9261
  var tmp;
9141
9262
  if (tmp0_elvis_lhs == null) {
9142
- throw get_logger().ln(MoveException.zn('move for origin=' + origin.toString() + ', target=' + target.toString() + ' not found'));
9263
+ throw get_logger().mn(MoveException.ao('move for origin=' + origin.toString() + ', target=' + target.toString() + ' not found'));
9143
9264
  } else {
9144
9265
  tmp = tmp0_elvis_lhs;
9145
9266
  }
@@ -9151,7 +9272,7 @@ function yieldMoveFromOriginTargetPromotionObjects$lambda($moves) {
9151
9272
  var tmp0_elvis_lhs = $moves[hash_0(origin.m2_1, target.m2_1, promotionPiece.m2_1)];
9152
9273
  var tmp;
9153
9274
  if (tmp0_elvis_lhs == null) {
9154
- throw get_logger().ln(MoveException.zn('move for origin=' + origin.toString() + ', target=' + target.toString() + ', promotion=' + promotionPiece.toString() + ' not found'));
9275
+ throw get_logger().mn(MoveException.ao('move for origin=' + origin.toString() + ', target=' + target.toString() + ', promotion=' + promotionPiece.toString() + ' not found'));
9155
9276
  } else {
9156
9277
  tmp = tmp0_elvis_lhs;
9157
9278
  }
@@ -9163,7 +9284,7 @@ function yieldMoveFromString$lambda($map) {
9163
9284
  var tmp0_elvis_lhs = $map.j2(move);
9164
9285
  var tmp;
9165
9286
  if (tmp0_elvis_lhs == null) {
9166
- throw MoveException.zn(move + ' is not a valid move string');
9287
+ throw MoveException.ao(move + ' is not a valid move string');
9167
9288
  } else {
9168
9289
  tmp = tmp0_elvis_lhs;
9169
9290
  }
@@ -9381,7 +9502,7 @@ function isStalemate(bitboards, isWhiteMove, legalMoves) {
9381
9502
  return isInCheck === 0n && legalMoves === 0n;
9382
9503
  }
9383
9504
  function tupleOf(v1, v2) {
9384
- return Tuple.uq(v1, v2);
9505
+ return Tuple.vq(v1, v2);
9385
9506
  }
9386
9507
  function init_io_github_lunalobos_chess4kt_Tuple(_this__u8e3s4) {
9387
9508
  }
@@ -9425,16 +9546,41 @@ function get_VALID_FULL_MOVE_COUNTER_PATTERN() {
9425
9546
  return VALID_FULL_MOVE_COUNTER_PATTERN;
9426
9547
  }
9427
9548
  var VALID_FULL_MOVE_COUNTER_PATTERN;
9428
- function get_PIECES() {
9429
- _init_properties_util_kt__mcwhvi();
9430
- return PIECES;
9431
- }
9432
- var PIECES;
9433
9549
  function get_MOVE_PATTERN() {
9434
9550
  _init_properties_util_kt__mcwhvi();
9435
9551
  return MOVE_PATTERN;
9436
9552
  }
9437
9553
  var MOVE_PATTERN;
9554
+ function get_piecesEnglish() {
9555
+ _init_properties_util_kt__mcwhvi();
9556
+ return piecesEnglish;
9557
+ }
9558
+ var piecesEnglish;
9559
+ function get_piecesSpanish() {
9560
+ _init_properties_util_kt__mcwhvi();
9561
+ return piecesSpanish;
9562
+ }
9563
+ var piecesSpanish;
9564
+ function get_piecesGerman() {
9565
+ _init_properties_util_kt__mcwhvi();
9566
+ return piecesGerman;
9567
+ }
9568
+ var piecesGerman;
9569
+ function get_piecesFrench() {
9570
+ _init_properties_util_kt__mcwhvi();
9571
+ return piecesFrench;
9572
+ }
9573
+ var piecesFrench;
9574
+ function get_piecesItalian() {
9575
+ _init_properties_util_kt__mcwhvi();
9576
+ return piecesItalian;
9577
+ }
9578
+ var piecesItalian;
9579
+ function get_piecesDutch() {
9580
+ _init_properties_util_kt__mcwhvi();
9581
+ return piecesDutch;
9582
+ }
9583
+ var piecesDutch;
9438
9584
  function getColLetter(square) {
9439
9585
  _init_properties_util_kt__mcwhvi();
9440
9586
  var colNum = getCol(square);
@@ -9762,8 +9908,8 @@ function positionFromFen(fen) {
9762
9908
  if (!isValidFenFormat(fen)) {
9763
9909
  throw IllegalArgumentException.s('invalid fen ' + fen);
9764
9910
  }
9765
- var position = Position.oq(fen);
9766
- var bitboards = Position.oq(fen).eq();
9911
+ var position = Position.pq(fen);
9912
+ var bitboards = Position.pq(fen).fq();
9767
9913
  var validCheck = !inCheck(bitboards, !position.fj_1);
9768
9914
  var wpBitboards = bitboards[Piece_WP_getInstance().m2_1 - 1 | 0];
9769
9915
  var bpBitboards = bitboards[Piece_BP_getInstance().m2_1 - 1 | 0];
@@ -9876,11 +10022,11 @@ function get_enPassantSquare(_this__u8e3s4) {
9876
10022
  }
9877
10023
  function get_draw(_this__u8e3s4) {
9878
10024
  _init_properties_util_kt__mcwhvi();
9879
- return _this__u8e3s4.hq() || _this__u8e3s4.iq();
10025
+ return _this__u8e3s4.iq() || _this__u8e3s4.jq();
9880
10026
  }
9881
10027
  function get_gameOver(_this__u8e3s4) {
9882
10028
  _init_properties_util_kt__mcwhvi();
9883
- return _this__u8e3s4.gq() || _this__u8e3s4.hq() || _this__u8e3s4.iq();
10029
+ return _this__u8e3s4.hq() || _this__u8e3s4.iq() || _this__u8e3s4.jq();
9884
10030
  }
9885
10031
  function get_sideToMove(_this__u8e3s4) {
9886
10032
  _init_properties_util_kt__mcwhvi();
@@ -9888,7 +10034,7 @@ function get_sideToMove(_this__u8e3s4) {
9888
10034
  }
9889
10035
  function get_children(_this__u8e3s4) {
9890
10036
  _init_properties_util_kt__mcwhvi();
9891
- return generateChildren(_this__u8e3s4.dq(), _this__u8e3s4);
10037
+ return generateChildren(_this__u8e3s4.eq(), _this__u8e3s4);
9892
10038
  }
9893
10039
  function move(_this__u8e3s4, move) {
9894
10040
  _init_properties_util_kt__mcwhvi();
@@ -9911,7 +10057,7 @@ function move(_this__u8e3s4, move) {
9911
10057
  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pk_1;
9912
10058
  var tmp;
9913
10059
  if (tmp1_elvis_lhs == null) {
9914
- throw MoveException.zn('illegal move ' + move.toString());
10060
+ throw MoveException.ao('illegal move ' + move.toString());
9915
10061
  } else {
9916
10062
  tmp = tmp1_elvis_lhs;
9917
10063
  }
@@ -9947,7 +10093,7 @@ function move_0(_this__u8e3s4, move, notation) {
9947
10093
  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pk_1;
9948
10094
  var tmp_0;
9949
10095
  if (tmp1_elvis_lhs == null) {
9950
- throw MoveException.zn('illegal move ' + move);
10096
+ throw MoveException.ao('illegal move ' + move);
9951
10097
  } else {
9952
10098
  tmp_0 = tmp1_elvis_lhs;
9953
10099
  }
@@ -9979,7 +10125,7 @@ function move_0(_this__u8e3s4, move, notation) {
9979
10125
  var tmp2_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pk_1;
9980
10126
  var tmp_1;
9981
10127
  if (tmp2_elvis_lhs == null) {
9982
- throw MoveException.zn('illegal move ' + move);
10128
+ throw MoveException.ao('illegal move ' + move);
9983
10129
  } else {
9984
10130
  tmp_1 = tmp2_elvis_lhs;
9985
10131
  }
@@ -9994,7 +10140,7 @@ function move_0(_this__u8e3s4, move, notation) {
9994
10140
  }
9995
10141
  function isLegal(_this__u8e3s4, move) {
9996
10142
  _init_properties_util_kt__mcwhvi();
9997
- var m = get_moveFromOriginTargetPromotion()(move.pn_1, move.rn_1, move.qn_1);
10143
+ var m = get_moveFromOriginTargetPromotion()(move.qn_1, move.sn_1, move.rn_1);
9998
10144
  var tmp0 = get_children(_this__u8e3s4);
9999
10145
  var tmp$ret$0;
10000
10146
  $l$block_0: {
@@ -10021,107 +10167,6 @@ function isLegal(_this__u8e3s4, move) {
10021
10167
  }
10022
10168
  return tmp$ret$0;
10023
10169
  }
10024
- function toSan(position, move_0) {
10025
- _init_properties_util_kt__mcwhvi();
10026
- // Inline function 'kotlin.require' call
10027
- if (!isLegal(position, move_0)) {
10028
- var message = 'illegal move ' + move_0.toString() + ' for position ' + position.lq();
10029
- throw IllegalArgumentException.s(toString(message));
10030
- }
10031
- var sbSAN = StringBuilder.u();
10032
- var piece = get_entries_0().c1(position.kq()[move_0.pn_1]);
10033
- sbSAN.j8(get_PIECES()[piece.m2_1]);
10034
- var isPawn = piece.equals(Piece_WP_getInstance()) || piece.equals(Piece_BP_getInstance());
10035
- var tmp = asSequence(get_children(position));
10036
- var tmp_0 = map(tmp, toSan$lambda);
10037
- var tmp_1 = filter(tmp_0, toSan$lambda_0(move_0));
10038
- var tmp_2 = filter(tmp_1, toSan$lambda_1(position, move_0));
10039
- var moves = toList(filter(tmp_2, toSan$lambda_2(move_0)));
10040
- var tmp$ret$2;
10041
- $l$block_0: {
10042
- // Inline function 'kotlin.collections.any' call
10043
- var tmp_3;
10044
- if (isInterface(moves, Collection)) {
10045
- tmp_3 = moves.c2();
10046
- } else {
10047
- tmp_3 = false;
10048
- }
10049
- if (tmp_3) {
10050
- tmp$ret$2 = false;
10051
- break $l$block_0;
10052
- }
10053
- var _iterator__ex2g4s = moves.x();
10054
- while (_iterator__ex2g4s.z()) {
10055
- var element = _iterator__ex2g4s.a1();
10056
- if (getCol(element.pn_1) === getCol(move_0.pn_1)) {
10057
- tmp$ret$2 = true;
10058
- break $l$block_0;
10059
- }
10060
- }
10061
- tmp$ret$2 = false;
10062
- }
10063
- var sameColumn = tmp$ret$2;
10064
- var tmp$ret$4;
10065
- $l$block_2: {
10066
- // Inline function 'kotlin.collections.any' call
10067
- var tmp_4;
10068
- if (isInterface(moves, Collection)) {
10069
- tmp_4 = moves.c2();
10070
- } else {
10071
- tmp_4 = false;
10072
- }
10073
- if (tmp_4) {
10074
- tmp$ret$4 = false;
10075
- break $l$block_2;
10076
- }
10077
- var _iterator__ex2g4s_0 = moves.x();
10078
- while (_iterator__ex2g4s_0.z()) {
10079
- var element_0 = _iterator__ex2g4s_0.a1();
10080
- if (getRow(element_0.pn_1) === getRow(move_0.pn_1)) {
10081
- tmp$ret$4 = true;
10082
- break $l$block_2;
10083
- }
10084
- }
10085
- tmp$ret$4 = false;
10086
- }
10087
- var sameRow = tmp$ret$4;
10088
- if (sameRow && !sameColumn && !isPawn) {
10089
- sbSAN.j8(getColLetter(move_0.pn_1));
10090
- }
10091
- if (!sameRow && sameColumn) {
10092
- sbSAN.za(getRow(move_0.pn_1) + 1 | 0);
10093
- }
10094
- if (sameRow && sameColumn) {
10095
- sbSAN.j8(getColLetter(move_0.pn_1)).za(getRow(move_0.pn_1) + 1 | 0);
10096
- }
10097
- if (!sameRow && !sameColumn && !moves.c2() && !isPawn) {
10098
- sbSAN.j8(getColLetter(move_0.pn_1));
10099
- }
10100
- var capture = !(position.kq()[move_0.rn_1] === Piece_EMPTY_getInstance().m2_1);
10101
- if (capture) {
10102
- if (isPawn) {
10103
- sbSAN.j8(getColLetter(move_0.pn_1));
10104
- }
10105
- sbSAN.j8('x');
10106
- }
10107
- sbSAN.j8(getColLetter(move_0.rn_1)).za(getRow(move_0.rn_1) + 1 | 0);
10108
- var isPromotion_0 = !(move_0.qn_1 === -1) && isPromotion(move_0.rn_1) === 1n;
10109
- if (isPromotion_0) {
10110
- sbSAN.j8('=').j8(get_PIECES()[move_0.qn_1]);
10111
- }
10112
- var isCastle = !!(piece === Piece_WK_getInstance() | piece === Piece_BK_getInstance()) && listOf(['e1g1', 'e1c1', 'e8g8', 'e8c8']).d2(move_0.toString());
10113
- if (isCastle) {
10114
- sbSAN = StringBuilder.u();
10115
- sbSAN.j8(!!(startsWith(move_0.toString(), 'g1', 2) | startsWith(move_0.toString(), 'g8', 2)) ? 'O-O' : 'O-O-O');
10116
- }
10117
- var p = move(position, move_0);
10118
- if (p.gq()) {
10119
- sbSAN.j8('#');
10120
- } else if (p.fq()) {
10121
- sbSAN.j8('+');
10122
- }
10123
- return sbSAN.toString();
10124
- }
10125
10170
  function genericHashCode(a) {
10126
10171
  _init_properties_util_kt__mcwhvi();
10127
10172
  if (a == null)
@@ -10186,7 +10231,7 @@ function sanToMove(position, sanMove) {
10186
10231
  var tmp3_elvis_lhs = tmp_0;
10187
10232
  var tmp_1;
10188
10233
  if (tmp3_elvis_lhs == null) {
10189
- throw MoveException.zn('Invalid castling move: ' + sanMove);
10234
+ throw MoveException.ao('Invalid castling move: ' + sanMove);
10190
10235
  } else {
10191
10236
  tmp_1 = tmp3_elvis_lhs;
10192
10237
  }
@@ -10205,7 +10250,7 @@ function sanToMove(position, sanMove) {
10205
10250
  var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.zb_1;
10206
10251
  var tmp_2;
10207
10252
  if (tmp7_elvis_lhs == null) {
10208
- throw MoveException.zn('Missing target column in SAN move: ' + sanMove);
10253
+ throw MoveException.ao('Missing target column in SAN move: ' + sanMove);
10209
10254
  } else {
10210
10255
  tmp_2 = tmp7_elvis_lhs;
10211
10256
  }
@@ -10214,7 +10259,7 @@ function sanToMove(position, sanMove) {
10214
10259
  var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.zb_1;
10215
10260
  var tmp_3;
10216
10261
  if (tmp9_elvis_lhs == null) {
10217
- throw MoveException.zn('Missing target row in SAN move: ' + sanMove);
10262
+ throw MoveException.ao('Missing target row in SAN move: ' + sanMove);
10218
10263
  } else {
10219
10264
  tmp_3 = tmp9_elvis_lhs;
10220
10265
  }
@@ -10255,7 +10300,7 @@ function sanToMove(position, sanMove) {
10255
10300
  var xDestiny = getColIndex(targetCol);
10256
10301
  var yDestiny = toInt(targetRow) - 1 | 0;
10257
10302
  var destinySquare = getSquareIndex(xDestiny, yDestiny);
10258
- var tmp_6 = asSequence(position.dq().fp());
10303
+ var tmp_6 = asSequence(position.eq().gp());
10259
10304
  var tmp_7 = filter(tmp_6, sanToMove$lambda(destinySquare));
10260
10305
  var tmp_8 = filter(tmp_7, sanToMove$lambda_0(position, piece));
10261
10306
  var tmp0 = filter(tmp_8, sanToMove$lambda_1(origin_1));
@@ -10266,8 +10311,8 @@ function sanToMove(position, sanMove) {
10266
10311
  while (_iterator__ex2g4s.z()) {
10267
10312
  var element = _iterator__ex2g4s.a1();
10268
10313
  var tmp_9;
10269
- if (!(element.qn_1 === -1)) {
10270
- var promotedPieceChar = substring_0(get_entries_0().c1(element.qn_1).toString(), 1, 2);
10314
+ if (!(element.rn_1 === -1)) {
10315
+ var promotedPieceChar = substring_0(get_entries_0().c1(element.rn_1).toString(), 1, 2);
10271
10316
  tmp_9 = promotedPieceChar === promotionPieceSAN;
10272
10317
  } else {
10273
10318
  // Inline function 'kotlin.text.isEmpty' call
@@ -10283,7 +10328,7 @@ function sanToMove(position, sanMove) {
10283
10328
  var tmp12_elvis_lhs = tmp$ret$13;
10284
10329
  var tmp_10;
10285
10330
  if (tmp12_elvis_lhs == null) {
10286
- throw MoveException.zn("The move '" + sanMove + "' is not a legal move in the current position " + position.lq());
10331
+ throw MoveException.ao("The move '" + sanMove + "' is not a legal move in the current position " + position.mq());
10287
10332
  } else {
10288
10333
  tmp_10 = tmp12_elvis_lhs;
10289
10334
  }
@@ -10336,35 +10381,214 @@ function deleteBefore(_this__u8e3s4, node) {
10336
10381
  var oldParent = tmp;
10337
10382
  // Inline function 'kotlin.apply' call
10338
10383
  var this_0 = new RootNode(_this__u8e3s4, oldParent.uj());
10339
- this_0.fl_1.k(node);
10384
+ this_0.gl_1.k(node);
10340
10385
  var newParent = this_0;
10341
10386
  node.uk(newParent);
10342
- _this__u8e3s4.fm(newParent);
10387
+ _this__u8e3s4.gm(newParent);
10343
10388
  var last_0 = last(asSequence_1(_this__u8e3s4.x()));
10344
- _this__u8e3s4.ul(last_0);
10389
+ _this__u8e3s4.vl(last_0);
10345
10390
  var tmp0 = _this__u8e3s4.xj_1;
10346
10391
  // Inline function 'kotlin.collections.set' call
10347
- var value = newParent.dl_1.lq();
10392
+ var value = newParent.el_1.mq();
10348
10393
  tmp0.f5('fen', value);
10349
10394
  return node;
10350
10395
  }
10351
10396
  function whiteLacksOfMaterial(_this__u8e3s4) {
10352
10397
  _init_properties_util_kt__mcwhvi();
10353
- return isWhiteLackOfMaterial(_this__u8e3s4.eq());
10398
+ return isWhiteLackOfMaterial(_this__u8e3s4.fq());
10354
10399
  }
10355
10400
  function blackLacksOfMaterial(_this__u8e3s4) {
10356
10401
  _init_properties_util_kt__mcwhvi();
10357
- return isBlackLackOfMaterial(_this__u8e3s4.eq());
10402
+ return isBlackLackOfMaterial(_this__u8e3s4.fq());
10403
+ }
10404
+ function toSan_0(position, move_0, pieces) {
10405
+ pieces = pieces === VOID ? get_piecesEnglish() : pieces;
10406
+ _init_properties_util_kt__mcwhvi();
10407
+ // Inline function 'kotlin.require' call
10408
+ if (!isLegal(position, move_0)) {
10409
+ var message = 'illegal move ' + move_0.toString() + ' for position ' + position.mq();
10410
+ throw IllegalArgumentException.s(toString(message));
10411
+ }
10412
+ var sbSAN = StringBuilder.u();
10413
+ var piece = get_entries_0().c1(position.lq()[move_0.qn_1]);
10414
+ sbSAN.j8(pieces[piece.m2_1]);
10415
+ var isPawn = piece.equals(Piece_WP_getInstance()) || piece.equals(Piece_BP_getInstance());
10416
+ var tmp = asSequence(get_children(position));
10417
+ var tmp_0 = map(tmp, toSan$lambda);
10418
+ var tmp_1 = filter(tmp_0, toSan$lambda_0(move_0));
10419
+ var tmp_2 = filter(tmp_1, toSan$lambda_1(position, move_0));
10420
+ var moves = toList(filter(tmp_2, toSan$lambda_2(move_0)));
10421
+ var tmp$ret$2;
10422
+ $l$block_0: {
10423
+ // Inline function 'kotlin.collections.any' call
10424
+ var tmp_3;
10425
+ if (isInterface(moves, Collection)) {
10426
+ tmp_3 = moves.c2();
10427
+ } else {
10428
+ tmp_3 = false;
10429
+ }
10430
+ if (tmp_3) {
10431
+ tmp$ret$2 = false;
10432
+ break $l$block_0;
10433
+ }
10434
+ var _iterator__ex2g4s = moves.x();
10435
+ while (_iterator__ex2g4s.z()) {
10436
+ var element = _iterator__ex2g4s.a1();
10437
+ if (getCol(element.qn_1) === getCol(move_0.qn_1)) {
10438
+ tmp$ret$2 = true;
10439
+ break $l$block_0;
10440
+ }
10441
+ }
10442
+ tmp$ret$2 = false;
10443
+ }
10444
+ var sameColumn = tmp$ret$2;
10445
+ var tmp$ret$4;
10446
+ $l$block_2: {
10447
+ // Inline function 'kotlin.collections.any' call
10448
+ var tmp_4;
10449
+ if (isInterface(moves, Collection)) {
10450
+ tmp_4 = moves.c2();
10451
+ } else {
10452
+ tmp_4 = false;
10453
+ }
10454
+ if (tmp_4) {
10455
+ tmp$ret$4 = false;
10456
+ break $l$block_2;
10457
+ }
10458
+ var _iterator__ex2g4s_0 = moves.x();
10459
+ while (_iterator__ex2g4s_0.z()) {
10460
+ var element_0 = _iterator__ex2g4s_0.a1();
10461
+ if (getRow(element_0.qn_1) === getRow(move_0.qn_1)) {
10462
+ tmp$ret$4 = true;
10463
+ break $l$block_2;
10464
+ }
10465
+ }
10466
+ tmp$ret$4 = false;
10467
+ }
10468
+ var sameRow = tmp$ret$4;
10469
+ if (sameRow && !sameColumn && !isPawn) {
10470
+ sbSAN.j8(getColLetter(move_0.qn_1));
10471
+ }
10472
+ if (!sameRow && sameColumn) {
10473
+ sbSAN.za(getRow(move_0.qn_1) + 1 | 0);
10474
+ }
10475
+ if (sameRow && sameColumn) {
10476
+ sbSAN.j8(getColLetter(move_0.qn_1)).za(getRow(move_0.qn_1) + 1 | 0);
10477
+ }
10478
+ if (!sameRow && !sameColumn && !moves.c2() && !isPawn) {
10479
+ sbSAN.j8(getColLetter(move_0.qn_1));
10480
+ }
10481
+ var capture = !(position.lq()[move_0.sn_1] === Piece_EMPTY_getInstance().m2_1);
10482
+ if (capture) {
10483
+ if (isPawn) {
10484
+ sbSAN.j8(getColLetter(move_0.qn_1));
10485
+ }
10486
+ sbSAN.j8('x');
10487
+ }
10488
+ sbSAN.j8(getColLetter(move_0.sn_1)).za(getRow(move_0.sn_1) + 1 | 0);
10489
+ var isPromotion_0 = !(move_0.rn_1 === -1) && isPromotion(move_0.sn_1) === 1n;
10490
+ if (isPromotion_0) {
10491
+ sbSAN.j8('=').j8(pieces[move_0.rn_1]);
10492
+ }
10493
+ var isCastle = !!(piece.equals(Piece_WK_getInstance()) | piece.equals(Piece_BK_getInstance())) && listOf(['e1g1', 'e1c1', 'e8g8', 'e8c8']).d2(move_0.toString());
10494
+ if (isCastle) {
10495
+ sbSAN = StringBuilder.u();
10496
+ sbSAN.j8(!!(startsWith(move_0.toString(), 'g1', 2) | startsWith(move_0.toString(), 'g8', 2)) ? 'O-O' : 'O-O-O');
10497
+ }
10498
+ var p = move(position, move_0);
10499
+ if (p.hq()) {
10500
+ sbSAN.j8('#');
10501
+ } else if (p.gq()) {
10502
+ sbSAN.j8('+');
10503
+ }
10504
+ return sbSAN.toString();
10505
+ }
10506
+ function get_friends(_this__u8e3s4) {
10507
+ _init_properties_util_kt__mcwhvi();
10508
+ var tmp;
10509
+ if (_this__u8e3s4.fj_1) {
10510
+ // Inline function 'kotlin.arrayOf' call
10511
+ // Inline function 'kotlin.js.unsafeCast' call
10512
+ // Inline function 'kotlin.js.asDynamic' call
10513
+ var tmp$ret$2 = [Piece_WP_getInstance(), Piece_WN_getInstance(), Piece_WB_getInstance(), Piece_WR_getInstance(), Piece_WQ_getInstance(), Piece_WK_getInstance()];
10514
+ var tmp_0 = asSequence_2(tmp$ret$2);
10515
+ // Inline function 'kotlin.sequences.fold' call
10516
+ var accumulator = 0n;
10517
+ var _iterator__ex2g4s = map(tmp_0, _get_friends_$lambda_r7z9e7(_this__u8e3s4)).x();
10518
+ while (_iterator__ex2g4s.z()) {
10519
+ var element = _iterator__ex2g4s.a1();
10520
+ accumulator = accumulator | element;
10521
+ }
10522
+ tmp = accumulator;
10523
+ } else {
10524
+ // Inline function 'kotlin.arrayOf' call
10525
+ // Inline function 'kotlin.js.unsafeCast' call
10526
+ // Inline function 'kotlin.js.asDynamic' call
10527
+ var tmp$ret$7 = [Piece_BP_getInstance(), Piece_BN_getInstance(), Piece_BB_getInstance(), Piece_BR_getInstance(), Piece_BQ_getInstance(), Piece_BK_getInstance()];
10528
+ var tmp_1 = asSequence_2(tmp$ret$7);
10529
+ // Inline function 'kotlin.sequences.fold' call
10530
+ var accumulator_0 = 0n;
10531
+ var _iterator__ex2g4s_0 = map(tmp_1, _get_friends_$lambda_r7z9e7_0(_this__u8e3s4)).x();
10532
+ while (_iterator__ex2g4s_0.z()) {
10533
+ var element_0 = _iterator__ex2g4s_0.a1();
10534
+ accumulator_0 = accumulator_0 | element_0;
10535
+ }
10536
+ tmp = accumulator_0;
10537
+ }
10538
+ return tmp;
10539
+ }
10540
+ function get_enemies(_this__u8e3s4) {
10541
+ _init_properties_util_kt__mcwhvi();
10542
+ var tmp;
10543
+ if (_this__u8e3s4.fj_1) {
10544
+ // Inline function 'kotlin.arrayOf' call
10545
+ // Inline function 'kotlin.js.unsafeCast' call
10546
+ // Inline function 'kotlin.js.asDynamic' call
10547
+ var tmp$ret$2 = [Piece_BP_getInstance(), Piece_BN_getInstance(), Piece_BB_getInstance(), Piece_BR_getInstance(), Piece_BQ_getInstance(), Piece_BK_getInstance()];
10548
+ var tmp_0 = asSequence_2(tmp$ret$2);
10549
+ // Inline function 'kotlin.sequences.fold' call
10550
+ var accumulator = 0n;
10551
+ var _iterator__ex2g4s = map(tmp_0, _get_enemies_$lambda_4gx6u8(_this__u8e3s4)).x();
10552
+ while (_iterator__ex2g4s.z()) {
10553
+ var element = _iterator__ex2g4s.a1();
10554
+ accumulator = accumulator | element;
10555
+ }
10556
+ tmp = accumulator;
10557
+ } else {
10558
+ // Inline function 'kotlin.arrayOf' call
10559
+ // Inline function 'kotlin.js.unsafeCast' call
10560
+ // Inline function 'kotlin.js.asDynamic' call
10561
+ var tmp$ret$7 = [Piece_WP_getInstance(), Piece_WN_getInstance(), Piece_WB_getInstance(), Piece_WR_getInstance(), Piece_WQ_getInstance(), Piece_WK_getInstance()];
10562
+ var tmp_1 = asSequence_2(tmp$ret$7);
10563
+ // Inline function 'kotlin.sequences.fold' call
10564
+ var accumulator_0 = 0n;
10565
+ var _iterator__ex2g4s_0 = map(tmp_1, _get_enemies_$lambda_4gx6u8_0(_this__u8e3s4)).x();
10566
+ while (_iterator__ex2g4s_0.z()) {
10567
+ var element_0 = _iterator__ex2g4s_0.a1();
10568
+ accumulator_0 = accumulator_0 | element_0;
10569
+ }
10570
+ tmp = accumulator_0;
10571
+ }
10572
+ return tmp;
10573
+ }
10574
+ function flipSide(_this__u8e3s4) {
10575
+ _init_properties_util_kt__mcwhvi();
10576
+ if (_this__u8e3s4.hq() || _this__u8e3s4.gq()) {
10577
+ // Inline function 'kotlin.error' call
10578
+ var message = "this position can't be flipped because it derives to an illegal position";
10579
+ throw IllegalStateException.e3(toString(message));
10580
+ }
10581
+ return Position.oq(_this__u8e3s4.fq(), !_this__u8e3s4.fj_1, _this__u8e3s4.gj_1, _this__u8e3s4.hj_1, _this__u8e3s4.ij_1, _this__u8e3s4.jj_1, _this__u8e3s4.kj_1, _this__u8e3s4.lj_1, _this__u8e3s4.mj_1);
10358
10582
  }
10359
10583
  function toSquares$lambda(it) {
10360
10584
  _init_properties_util_kt__mcwhvi();
10361
10585
  return Companion_instance_6.c1(countTrailingZeroBits(it));
10362
10586
  }
10363
10587
  function *_generator_invoke__zhh2q8_2($this, $this$sequence, $completion) {
10364
- var copy = $this.vq_1;
10588
+ var copy = $this.wq_1;
10365
10589
  while (!(copy === 0n)) {
10366
10590
  var lowestOneBit = copy & negate(copy);
10367
- var tmp = $this$sequence.ud($this.wq_1(lowestOneBit), $completion);
10591
+ var tmp = $this$sequence.ud($this.xq_1(lowestOneBit), $completion);
10368
10592
  if (tmp === get_COROUTINE_SUSPENDED())
10369
10593
  tmp = yield tmp;
10370
10594
  copy = copy & ~lowestOneBit;
@@ -10373,29 +10597,16 @@ function *_generator_invoke__zhh2q8_2($this, $this$sequence, $completion) {
10373
10597
  }
10374
10598
  function bitboardToSequence$slambda_0($bitboard, $entitiesFactory) {
10375
10599
  var i = new bitboardToSequence$slambda($bitboard, $entitiesFactory);
10376
- var l = ($this$sequence, $completion) => i.xq($this$sequence, $completion);
10600
+ var l = ($this$sequence, $completion) => i.yq($this$sequence, $completion);
10377
10601
  l.$arity = 1;
10378
10602
  return l;
10379
10603
  }
10380
- function toSan$lambda(it) {
10381
- _init_properties_util_kt__mcwhvi();
10382
- return it.qk_1;
10383
- }
10384
- function toSan$lambda_0($move) {
10385
- return (m) => m.rn_1 === $move.rn_1;
10386
- }
10387
- function toSan$lambda_1($position, $move) {
10388
- return (m) => get_entries_0().c1($position.kq()[m.pn_1]) === get_entries_0().c1($position.kq()[$move.pn_1]);
10389
- }
10390
- function toSan$lambda_2($move) {
10391
- return (m) => !(m.pn_1 === $move.pn_1);
10392
- }
10393
10604
  function sanToMove$lambda($destinySquare) {
10394
- return (m) => m.rn_1 === $destinySquare;
10605
+ return (m) => m.sn_1 === $destinySquare;
10395
10606
  }
10396
10607
  function sanToMove$lambda_0($position, $piece) {
10397
10608
  return (m) => {
10398
- var movePiece = get_entries_0().c1($position.kq()[m.pn_1]);
10609
+ var movePiece = get_entries_0().c1($position.lq()[m.qn_1]);
10399
10610
  return movePiece.equals($piece);
10400
10611
  };
10401
10612
  }
@@ -10407,10 +10618,10 @@ function sanToMove$lambda_1($origin) {
10407
10618
  var tmp_0;
10408
10619
  if (isDigit(first($origin))) {
10409
10620
  var row = toInt($origin) - 1 | 0;
10410
- tmp_0 = getRow(m.pn_1) === row;
10621
+ tmp_0 = getRow(m.qn_1) === row;
10411
10622
  } else {
10412
10623
  var col = getColIndex($origin);
10413
- tmp_0 = getCol(m.pn_1) === col;
10624
+ tmp_0 = getCol(m.qn_1) === col;
10414
10625
  }
10415
10626
 
10416
10627
  tmp = tmp_0;
@@ -10425,6 +10636,31 @@ function sanToMove$lambda_1($origin) {
10425
10636
  return tmp;
10426
10637
  };
10427
10638
  }
10639
+ function toSan$lambda(it) {
10640
+ _init_properties_util_kt__mcwhvi();
10641
+ return it.qk_1;
10642
+ }
10643
+ function toSan$lambda_0($move) {
10644
+ return (m) => m.sn_1 === $move.sn_1;
10645
+ }
10646
+ function toSan$lambda_1($position, $move) {
10647
+ return (m) => get_entries_0().c1($position.lq()[m.qn_1]) === get_entries_0().c1($position.lq()[$move.qn_1]);
10648
+ }
10649
+ function toSan$lambda_2($move) {
10650
+ return (m) => !(m.qn_1 === $move.qn_1);
10651
+ }
10652
+ function _get_friends_$lambda_r7z9e7($this_friends) {
10653
+ return (p) => $this_friends.fq()[p.m2_1 - 1 | 0];
10654
+ }
10655
+ function _get_friends_$lambda_r7z9e7_0($this_friends) {
10656
+ return (p) => $this_friends.fq()[p.m2_1 - 1 | 0];
10657
+ }
10658
+ function _get_enemies_$lambda_4gx6u8($this_enemies) {
10659
+ return (p) => $this_enemies.fq()[p.m2_1 - 1 | 0];
10660
+ }
10661
+ function _get_enemies_$lambda_4gx6u8_0($this_enemies) {
10662
+ return (p) => $this_enemies.fq()[p.m2_1 - 1 | 0];
10663
+ }
10428
10664
  var properties_initialized_util_kt_qfsh5w;
10429
10665
  function _init_properties_util_kt__mcwhvi() {
10430
10666
  if (!properties_initialized_util_kt_qfsh5w) {
@@ -10440,11 +10676,31 @@ function _init_properties_util_kt__mcwhvi() {
10440
10676
  VALID_EN_PASSANT_PATTERN = Regex.nb('^[-]{1}$|^[abcdefgh][36]$');
10441
10677
  VALID_HALF_MOVE_CLOCK_PATTERN = Regex.nb('^[0123456789]+$');
10442
10678
  VALID_FULL_MOVE_COUNTER_PATTERN = Regex.nb('^[1-9][0-9]*$');
10679
+ MOVE_PATTERN = Regex.nb('(?<move>(?<regular>(?<piece>[KQBNR])?(?<originCol>[a-h])?(?<originRow>[1-8])?x?(?<targetCol>[a-h])(?<targetRow>[1-8])=?(?<promotion>[QBNR])?)|(?<castle>O-O(-O)?))(?<check>[+#])?');
10443
10680
  // Inline function 'kotlin.arrayOf' call
10444
10681
  // Inline function 'kotlin.js.unsafeCast' call
10445
10682
  // Inline function 'kotlin.js.asDynamic' call
10446
- PIECES = ['', '', 'N', 'B', 'R', 'Q', 'K', '', 'N', 'B', 'R', 'Q', 'K'];
10447
- MOVE_PATTERN = Regex.nb('(?<move>(?<regular>(?<piece>[KQBNR])?(?<originCol>[a-h])?(?<originRow>[1-8])?x?(?<targetCol>[a-h])(?<targetRow>[1-8])=?(?<promotion>[QBNR])?)|(?<castle>O-O(-O)?))(?<check>[+#])?');
10683
+ piecesEnglish = ['', '', 'N', 'B', 'R', 'Q', 'K', '', 'N', 'B', 'R', 'Q', 'K'];
10684
+ // Inline function 'kotlin.arrayOf' call
10685
+ // Inline function 'kotlin.js.unsafeCast' call
10686
+ // Inline function 'kotlin.js.asDynamic' call
10687
+ piecesSpanish = ['', '', 'C', 'A', 'T', 'D', 'R', '', 'C', 'A', 'T', 'D', 'R'];
10688
+ // Inline function 'kotlin.arrayOf' call
10689
+ // Inline function 'kotlin.js.unsafeCast' call
10690
+ // Inline function 'kotlin.js.asDynamic' call
10691
+ piecesGerman = ['', '', 'S', 'L', 'T', 'D', 'K', '', 'S', 'L', 'T', 'D', 'K'];
10692
+ // Inline function 'kotlin.arrayOf' call
10693
+ // Inline function 'kotlin.js.unsafeCast' call
10694
+ // Inline function 'kotlin.js.asDynamic' call
10695
+ piecesFrench = ['', '', 'C', 'F', 'T', 'D', 'R', '', 'C', 'F', 'T', 'D', 'R'];
10696
+ // Inline function 'kotlin.arrayOf' call
10697
+ // Inline function 'kotlin.js.unsafeCast' call
10698
+ // Inline function 'kotlin.js.asDynamic' call
10699
+ piecesItalian = ['', '', 'C', 'A', 'T', 'D', 'R', '', 'C', 'A', 'T', 'D', 'R'];
10700
+ // Inline function 'kotlin.arrayOf' call
10701
+ // Inline function 'kotlin.js.unsafeCast' call
10702
+ // Inline function 'kotlin.js.asDynamic' call
10703
+ piecesDutch = ['', '', 'P', 'L', 'T', 'D', 'K', '', 'P', 'L', 'T', 'D', 'K'];
10448
10704
  }
10449
10705
  }
10450
10706
  function yieldComputeVisible() {
@@ -10743,7 +10999,7 @@ function yieldComputeZobristHash() {
10743
10999
  }
10744
11000
  while (inductionVariable_2 < 64);
10745
11001
  var t2 = System_instance.rg();
10746
- logger.mn(t1, t2);
11002
+ logger.nn(t1, t2);
10747
11003
  return yieldComputeZobristHash$lambda(zobristTable, zobristTurn, zobristCastle, zobristEnPassant);
10748
11004
  }
10749
11005
  function yieldComputeZobristHash$lambda($zobristTable, $zobristTurn, $zobristCastle, $zobristEnPassant) {
@@ -10923,19 +11179,19 @@ var properties_initialized_Piece_kt_ae3dia;
10923
11179
  function _init_properties_Piece_kt__xog22k() {
10924
11180
  if (!properties_initialized_Piece_kt_ae3dia) {
10925
11181
  properties_initialized_Piece_kt_ae3dia = true;
10926
- EMPTY_0 = Companion_getInstance_9().bs_1.c1(0);
10927
- WP_0 = Companion_getInstance_9().bs_1.c1(1);
10928
- WN_0 = Companion_getInstance_9().bs_1.c1(2);
10929
- WB_0 = Companion_getInstance_9().bs_1.c1(3);
10930
- WR_0 = Companion_getInstance_9().bs_1.c1(4);
10931
- WQ_0 = Companion_getInstance_9().bs_1.c1(5);
10932
- WK_0 = Companion_getInstance_9().bs_1.c1(6);
10933
- BP_0 = Companion_getInstance_9().bs_1.c1(7);
10934
- BN_0 = Companion_getInstance_9().bs_1.c1(8);
10935
- BB_0 = Companion_getInstance_9().bs_1.c1(9);
10936
- BR_0 = Companion_getInstance_9().bs_1.c1(10);
10937
- BQ_0 = Companion_getInstance_9().bs_1.c1(11);
10938
- BK_0 = Companion_getInstance_9().bs_1.c1(12);
11182
+ EMPTY_0 = Companion_getInstance_9().cs_1.c1(0);
11183
+ WP_0 = Companion_getInstance_9().cs_1.c1(1);
11184
+ WN_0 = Companion_getInstance_9().cs_1.c1(2);
11185
+ WB_0 = Companion_getInstance_9().cs_1.c1(3);
11186
+ WR_0 = Companion_getInstance_9().cs_1.c1(4);
11187
+ WQ_0 = Companion_getInstance_9().cs_1.c1(5);
11188
+ WK_0 = Companion_getInstance_9().cs_1.c1(6);
11189
+ BP_0 = Companion_getInstance_9().cs_1.c1(7);
11190
+ BN_0 = Companion_getInstance_9().cs_1.c1(8);
11191
+ BB_0 = Companion_getInstance_9().cs_1.c1(9);
11192
+ BR_0 = Companion_getInstance_9().cs_1.c1(10);
11193
+ BQ_0 = Companion_getInstance_9().cs_1.c1(11);
11194
+ BK_0 = Companion_getInstance_9().cs_1.c1(12);
10939
11195
  }
10940
11196
  }
10941
11197
  function get_WHITE() {
@@ -10958,8 +11214,8 @@ var properties_initialized_Side_kt_xjv14p;
10958
11214
  function _init_properties_Side_kt__trrix5() {
10959
11215
  if (!properties_initialized_Side_kt_xjv14p) {
10960
11216
  properties_initialized_Side_kt_xjv14p = true;
10961
- WHITE_0 = Companion_getInstance_10().ts_1.c1(0);
10962
- BLACK_0 = Companion_getInstance_10().ts_1.c1(1);
11217
+ WHITE_0 = Companion_getInstance_10().xs_1.c1(0);
11218
+ BLACK_0 = Companion_getInstance_10().xs_1.c1(1);
10963
11219
  }
10964
11220
  }
10965
11221
  function get_A1() {
@@ -11292,70 +11548,70 @@ var properties_initialized_Square_kt_d57phb;
11292
11548
  function _init_properties_Square_kt__qeygot() {
11293
11549
  if (!properties_initialized_Square_kt_d57phb) {
11294
11550
  properties_initialized_Square_kt_d57phb = true;
11295
- A1_0 = Companion_getInstance_11().vs_1.c1(0);
11296
- B1_0 = Companion_getInstance_11().vs_1.c1(1);
11297
- C1_0 = Companion_getInstance_11().vs_1.c1(2);
11298
- D1_0 = Companion_getInstance_11().vs_1.c1(3);
11299
- E1_0 = Companion_getInstance_11().vs_1.c1(4);
11300
- F1_0 = Companion_getInstance_11().vs_1.c1(5);
11301
- G1_0 = Companion_getInstance_11().vs_1.c1(6);
11302
- H1_0 = Companion_getInstance_11().vs_1.c1(7);
11303
- A2_0 = Companion_getInstance_11().vs_1.c1(8);
11304
- B2_0 = Companion_getInstance_11().vs_1.c1(9);
11305
- C2_0 = Companion_getInstance_11().vs_1.c1(10);
11306
- D2_0 = Companion_getInstance_11().vs_1.c1(11);
11307
- E2_0 = Companion_getInstance_11().vs_1.c1(12);
11308
- F2_0 = Companion_getInstance_11().vs_1.c1(13);
11309
- G2_0 = Companion_getInstance_11().vs_1.c1(14);
11310
- H2_0 = Companion_getInstance_11().vs_1.c1(15);
11311
- A3_0 = Companion_getInstance_11().vs_1.c1(16);
11312
- B3_0 = Companion_getInstance_11().vs_1.c1(17);
11313
- C3_0 = Companion_getInstance_11().vs_1.c1(18);
11314
- D3_0 = Companion_getInstance_11().vs_1.c1(19);
11315
- E3_0 = Companion_getInstance_11().vs_1.c1(20);
11316
- F3_0 = Companion_getInstance_11().vs_1.c1(21);
11317
- G3_0 = Companion_getInstance_11().vs_1.c1(22);
11318
- H3_0 = Companion_getInstance_11().vs_1.c1(23);
11319
- A4_0 = Companion_getInstance_11().vs_1.c1(24);
11320
- B4_0 = Companion_getInstance_11().vs_1.c1(25);
11321
- C4_0 = Companion_getInstance_11().vs_1.c1(26);
11322
- D4_0 = Companion_getInstance_11().vs_1.c1(27);
11323
- E4_0 = Companion_getInstance_11().vs_1.c1(28);
11324
- F4_0 = Companion_getInstance_11().vs_1.c1(29);
11325
- G4_0 = Companion_getInstance_11().vs_1.c1(30);
11326
- H4_0 = Companion_getInstance_11().vs_1.c1(31);
11327
- A5_0 = Companion_getInstance_11().vs_1.c1(32);
11328
- B5_0 = Companion_getInstance_11().vs_1.c1(33);
11329
- C5_0 = Companion_getInstance_11().vs_1.c1(34);
11330
- D5_0 = Companion_getInstance_11().vs_1.c1(35);
11331
- E5_0 = Companion_getInstance_11().vs_1.c1(36);
11332
- F5_0 = Companion_getInstance_11().vs_1.c1(37);
11333
- G5_0 = Companion_getInstance_11().vs_1.c1(38);
11334
- H5_0 = Companion_getInstance_11().vs_1.c1(39);
11335
- A6_0 = Companion_getInstance_11().vs_1.c1(40);
11336
- B6_0 = Companion_getInstance_11().vs_1.c1(41);
11337
- C6_0 = Companion_getInstance_11().vs_1.c1(42);
11338
- D6_0 = Companion_getInstance_11().vs_1.c1(43);
11339
- E6_0 = Companion_getInstance_11().vs_1.c1(44);
11340
- F6_0 = Companion_getInstance_11().vs_1.c1(45);
11341
- G6_0 = Companion_getInstance_11().vs_1.c1(46);
11342
- H6_0 = Companion_getInstance_11().vs_1.c1(47);
11343
- A7_0 = Companion_getInstance_11().vs_1.c1(48);
11344
- B7_0 = Companion_getInstance_11().vs_1.c1(49);
11345
- C7_0 = Companion_getInstance_11().vs_1.c1(50);
11346
- D7_0 = Companion_getInstance_11().vs_1.c1(51);
11347
- E7_0 = Companion_getInstance_11().vs_1.c1(52);
11348
- F7_0 = Companion_getInstance_11().vs_1.c1(53);
11349
- G7_0 = Companion_getInstance_11().vs_1.c1(54);
11350
- H7_0 = Companion_getInstance_11().vs_1.c1(55);
11351
- A8_0 = Companion_getInstance_11().vs_1.c1(56);
11352
- B8_0 = Companion_getInstance_11().vs_1.c1(57);
11353
- C8_0 = Companion_getInstance_11().vs_1.c1(58);
11354
- D8_0 = Companion_getInstance_11().vs_1.c1(59);
11355
- E8_0 = Companion_getInstance_11().vs_1.c1(60);
11356
- F8_0 = Companion_getInstance_11().vs_1.c1(61);
11357
- G8_0 = Companion_getInstance_11().vs_1.c1(62);
11358
- H8_0 = Companion_getInstance_11().vs_1.c1(63);
11551
+ A1_0 = Companion_getInstance_11().zs_1.c1(0);
11552
+ B1_0 = Companion_getInstance_11().zs_1.c1(1);
11553
+ C1_0 = Companion_getInstance_11().zs_1.c1(2);
11554
+ D1_0 = Companion_getInstance_11().zs_1.c1(3);
11555
+ E1_0 = Companion_getInstance_11().zs_1.c1(4);
11556
+ F1_0 = Companion_getInstance_11().zs_1.c1(5);
11557
+ G1_0 = Companion_getInstance_11().zs_1.c1(6);
11558
+ H1_0 = Companion_getInstance_11().zs_1.c1(7);
11559
+ A2_0 = Companion_getInstance_11().zs_1.c1(8);
11560
+ B2_0 = Companion_getInstance_11().zs_1.c1(9);
11561
+ C2_0 = Companion_getInstance_11().zs_1.c1(10);
11562
+ D2_0 = Companion_getInstance_11().zs_1.c1(11);
11563
+ E2_0 = Companion_getInstance_11().zs_1.c1(12);
11564
+ F2_0 = Companion_getInstance_11().zs_1.c1(13);
11565
+ G2_0 = Companion_getInstance_11().zs_1.c1(14);
11566
+ H2_0 = Companion_getInstance_11().zs_1.c1(15);
11567
+ A3_0 = Companion_getInstance_11().zs_1.c1(16);
11568
+ B3_0 = Companion_getInstance_11().zs_1.c1(17);
11569
+ C3_0 = Companion_getInstance_11().zs_1.c1(18);
11570
+ D3_0 = Companion_getInstance_11().zs_1.c1(19);
11571
+ E3_0 = Companion_getInstance_11().zs_1.c1(20);
11572
+ F3_0 = Companion_getInstance_11().zs_1.c1(21);
11573
+ G3_0 = Companion_getInstance_11().zs_1.c1(22);
11574
+ H3_0 = Companion_getInstance_11().zs_1.c1(23);
11575
+ A4_0 = Companion_getInstance_11().zs_1.c1(24);
11576
+ B4_0 = Companion_getInstance_11().zs_1.c1(25);
11577
+ C4_0 = Companion_getInstance_11().zs_1.c1(26);
11578
+ D4_0 = Companion_getInstance_11().zs_1.c1(27);
11579
+ E4_0 = Companion_getInstance_11().zs_1.c1(28);
11580
+ F4_0 = Companion_getInstance_11().zs_1.c1(29);
11581
+ G4_0 = Companion_getInstance_11().zs_1.c1(30);
11582
+ H4_0 = Companion_getInstance_11().zs_1.c1(31);
11583
+ A5_0 = Companion_getInstance_11().zs_1.c1(32);
11584
+ B5_0 = Companion_getInstance_11().zs_1.c1(33);
11585
+ C5_0 = Companion_getInstance_11().zs_1.c1(34);
11586
+ D5_0 = Companion_getInstance_11().zs_1.c1(35);
11587
+ E5_0 = Companion_getInstance_11().zs_1.c1(36);
11588
+ F5_0 = Companion_getInstance_11().zs_1.c1(37);
11589
+ G5_0 = Companion_getInstance_11().zs_1.c1(38);
11590
+ H5_0 = Companion_getInstance_11().zs_1.c1(39);
11591
+ A6_0 = Companion_getInstance_11().zs_1.c1(40);
11592
+ B6_0 = Companion_getInstance_11().zs_1.c1(41);
11593
+ C6_0 = Companion_getInstance_11().zs_1.c1(42);
11594
+ D6_0 = Companion_getInstance_11().zs_1.c1(43);
11595
+ E6_0 = Companion_getInstance_11().zs_1.c1(44);
11596
+ F6_0 = Companion_getInstance_11().zs_1.c1(45);
11597
+ G6_0 = Companion_getInstance_11().zs_1.c1(46);
11598
+ H6_0 = Companion_getInstance_11().zs_1.c1(47);
11599
+ A7_0 = Companion_getInstance_11().zs_1.c1(48);
11600
+ B7_0 = Companion_getInstance_11().zs_1.c1(49);
11601
+ C7_0 = Companion_getInstance_11().zs_1.c1(50);
11602
+ D7_0 = Companion_getInstance_11().zs_1.c1(51);
11603
+ E7_0 = Companion_getInstance_11().zs_1.c1(52);
11604
+ F7_0 = Companion_getInstance_11().zs_1.c1(53);
11605
+ G7_0 = Companion_getInstance_11().zs_1.c1(54);
11606
+ H7_0 = Companion_getInstance_11().zs_1.c1(55);
11607
+ A8_0 = Companion_getInstance_11().zs_1.c1(56);
11608
+ B8_0 = Companion_getInstance_11().zs_1.c1(57);
11609
+ C8_0 = Companion_getInstance_11().zs_1.c1(58);
11610
+ D8_0 = Companion_getInstance_11().zs_1.c1(59);
11611
+ E8_0 = Companion_getInstance_11().zs_1.c1(60);
11612
+ F8_0 = Companion_getInstance_11().zs_1.c1(61);
11613
+ G8_0 = Companion_getInstance_11().zs_1.c1(62);
11614
+ H8_0 = Companion_getInstance_11().zs_1.c1(63);
11359
11615
  }
11360
11616
  }
11361
11617
  var Companion_instance_12;
@@ -11457,6 +11713,16 @@ function _init_properties_factory_kt__5kmpyw_0() {
11457
11713
  initialPosition = new Position_0(positionOf());
11458
11714
  }
11459
11715
  }
11716
+ function visibleSquares_1(piece, square, position) {
11717
+ // Inline function 'kotlin.text.uppercase' call
11718
+ // Inline function 'kotlin.js.asDynamic' call
11719
+ var tmp$ret$1 = piece.toUpperCase();
11720
+ var tmp = valueOf_4(tmp$ret$1);
11721
+ // Inline function 'kotlin.text.uppercase' call
11722
+ // Inline function 'kotlin.js.asDynamic' call
11723
+ var tmp$ret$3 = square.toUpperCase();
11724
+ return new Bitboard(visibleSquares_0(tmp, valueOf_5(tmp$ret$3), position.gs_1));
11725
+ }
11460
11726
  //region block: post-declaration
11461
11727
  initMetadataForCompanion(Companion);
11462
11728
  initMetadataForClass(CastleInfo, 'CastleInfo');
@@ -11473,12 +11739,14 @@ protoOf(RootNode).xk = promoteChild;
11473
11739
  protoOf(RootNode).yk = promoteNode;
11474
11740
  protoOf(RootNode).zk = removeChild;
11475
11741
  protoOf(RootNode).al = hasChildren;
11742
+ protoOf(RootNode).dl = toSan;
11476
11743
  initMetadataForClass(RootNode, 'RootNode', VOID, VOID, [Node]);
11477
11744
  protoOf(MoveNode).wk = appendMove$default;
11478
11745
  protoOf(MoveNode).xk = promoteChild;
11479
11746
  protoOf(MoveNode).yk = promoteNode;
11480
11747
  protoOf(MoveNode).zk = removeChild;
11481
11748
  protoOf(MoveNode).al = hasChildren;
11749
+ protoOf(MoveNode).dl = toSan;
11482
11750
  initMetadataForClass(MoveNode, 'MoveNode', VOID, VOID, [Node]);
11483
11751
  initMetadataForClass(GameMode, 'GameMode');
11484
11752
  initMetadataForClass(ThreeRepetitionsMode, 'ThreeRepetitionsMode');
@@ -11731,6 +11999,7 @@ export {
11731
11999
  strictMatch_0 as strictMatch,
11732
12000
  customGame_0 as customGame,
11733
12001
  parseGames_0 as parseGames,
12002
+ visibleSquares_1 as visibleSquares,
11734
12003
  };
11735
12004
  //endregion
11736
12005