chess4js 1.0.0-beta.4 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -38
- package/chess4js.d.mts +3 -0
- package/chess4js.mjs +1096 -958
- package/chess4js.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +17 -17
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/package.json +1 -1
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,
|
|
@@ -88,7 +89,6 @@ import {
|
|
|
88
89
|
countOneBits2h2gnqaw24v9c as countOneBits,
|
|
89
90
|
get_sign1dnxi33u9vk0c as get_sign,
|
|
90
91
|
negate13xrbakfwasjy as negate,
|
|
91
|
-
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
92
92
|
shiftRight2gqph14wydb8s as shiftRight,
|
|
93
93
|
until1jbpn0z3f8lbg as until,
|
|
94
94
|
addAll1k27qatfgp3k5 as addAll,
|
|
@@ -102,12 +102,12 @@ import {
|
|
|
102
102
|
trimIndent1qytc1wvt8suh as trimIndent,
|
|
103
103
|
Collection1k04j3hzsbod0 as Collection,
|
|
104
104
|
isInterface3d6p8outrmvmk as isInterface,
|
|
105
|
-
startsWith5hna0vjiqaqm as startsWith,
|
|
106
105
|
hashCodeq5arwsb9dgti as hashCode,
|
|
107
106
|
getc6436eumi25w as get,
|
|
108
107
|
Paire9pteg33gng7 as Pair,
|
|
109
108
|
titlecase36e9fbud5gg4t as titlecase,
|
|
110
109
|
isLowerCase16nv9n55l9laa as isLowerCase,
|
|
110
|
+
startsWith5hna0vjiqaqm as startsWith,
|
|
111
111
|
first3kg261hmihapu as first,
|
|
112
112
|
countTrailingZeroBitszhs0313cn11e as countTrailingZeroBits_0,
|
|
113
113
|
takeLowestOneBitmqr3ckwas5mk as takeLowestOneBit,
|
|
@@ -428,55 +428,94 @@ function hasChildren() {
|
|
|
428
428
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
429
429
|
return !this.bj().c2();
|
|
430
430
|
}
|
|
431
|
+
function toSan(language, pieces) {
|
|
432
|
+
if (this.rk() == null) {
|
|
433
|
+
return '';
|
|
434
|
+
}
|
|
435
|
+
var tmp;
|
|
436
|
+
switch (language) {
|
|
437
|
+
case 'english':
|
|
438
|
+
tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()));
|
|
439
|
+
break;
|
|
440
|
+
case 'spanish':
|
|
441
|
+
tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesSpanish());
|
|
442
|
+
break;
|
|
443
|
+
case 'dutch':
|
|
444
|
+
tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesDutch());
|
|
445
|
+
break;
|
|
446
|
+
case 'french':
|
|
447
|
+
tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesFrench());
|
|
448
|
+
break;
|
|
449
|
+
case 'german':
|
|
450
|
+
tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesGerman());
|
|
451
|
+
break;
|
|
452
|
+
case 'italian':
|
|
453
|
+
tmp = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), get_piecesItalian());
|
|
454
|
+
break;
|
|
455
|
+
default:
|
|
456
|
+
var tmp_0;
|
|
457
|
+
if (pieces == null) {
|
|
458
|
+
throw IllegalArgumentException.s('unknown language: ' + language + ' and pieces array is null');
|
|
459
|
+
} else if (!(pieces.length === 12)) {
|
|
460
|
+
throw IllegalArgumentException.s('unknown language: ' + language + ' and invalid pieces array');
|
|
461
|
+
} else {
|
|
462
|
+
tmp_0 = toSan_0(ensureNotNull(this.aj()).uj(), ensureNotNull(this.rk()), pieces);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
tmp = tmp_0;
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
return tmp;
|
|
469
|
+
}
|
|
431
470
|
class RootNode {
|
|
432
471
|
constructor($outer, position) {
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
435
|
-
this.
|
|
472
|
+
this.ml_1 = $outer;
|
|
473
|
+
this.el_1 = position;
|
|
474
|
+
this.fl_1 = null;
|
|
436
475
|
var tmp = this;
|
|
437
476
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
438
|
-
tmp.
|
|
439
|
-
this.gl_1 = null;
|
|
477
|
+
tmp.gl_1 = ArrayList.h1();
|
|
440
478
|
this.hl_1 = null;
|
|
441
479
|
this.il_1 = null;
|
|
442
480
|
this.jl_1 = null;
|
|
443
481
|
this.kl_1 = null;
|
|
482
|
+
this.ll_1 = null;
|
|
444
483
|
}
|
|
445
484
|
uj() {
|
|
446
|
-
return this.
|
|
485
|
+
return this.el_1;
|
|
447
486
|
}
|
|
448
487
|
cj() {
|
|
449
|
-
return this.
|
|
488
|
+
return this.fl_1;
|
|
450
489
|
}
|
|
451
490
|
bj() {
|
|
452
|
-
return this.
|
|
491
|
+
return this.gl_1;
|
|
453
492
|
}
|
|
454
493
|
dj() {
|
|
455
|
-
return this.
|
|
494
|
+
return this.hl_1;
|
|
456
495
|
}
|
|
457
|
-
|
|
496
|
+
nl(value) {
|
|
458
497
|
throw UnsupportedOperationException.da('RootNode does not accept suffix annotations.');
|
|
459
498
|
}
|
|
460
499
|
tk() {
|
|
461
|
-
return this.
|
|
500
|
+
return this.il_1;
|
|
462
501
|
}
|
|
463
502
|
uk(value) {
|
|
464
503
|
throw UnsupportedOperationException.da('RootNode does not accept a parent');
|
|
465
504
|
}
|
|
466
505
|
aj() {
|
|
467
|
-
return this.
|
|
506
|
+
return this.jl_1;
|
|
468
507
|
}
|
|
469
508
|
rk() {
|
|
470
|
-
return this.
|
|
509
|
+
return this.kl_1;
|
|
471
510
|
}
|
|
472
511
|
sk() {
|
|
473
|
-
return this.
|
|
512
|
+
return this.ll_1;
|
|
474
513
|
}
|
|
475
514
|
hashCode() {
|
|
476
515
|
// Inline function 'kotlin.arrayOf' call
|
|
477
516
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
478
517
|
// Inline function 'kotlin.js.asDynamic' call
|
|
479
|
-
var tmp$ret$2 = [this.
|
|
518
|
+
var tmp$ret$2 = [this.el_1, this.fl_1];
|
|
480
519
|
return genericHashCode(tmp$ret$2);
|
|
481
520
|
}
|
|
482
521
|
equals(other) {
|
|
@@ -490,14 +529,14 @@ class RootNode {
|
|
|
490
529
|
if (!(other instanceof RootNode)) {
|
|
491
530
|
tmp = false;
|
|
492
531
|
} else {
|
|
493
|
-
tmp = (this.
|
|
532
|
+
tmp = (this.el_1.equals(other.el_1) && this.fl_1 == other.fl_1 && this.hl_1 == other.hl_1);
|
|
494
533
|
}
|
|
495
534
|
}
|
|
496
535
|
}
|
|
497
536
|
return tmp;
|
|
498
537
|
}
|
|
499
538
|
toString() {
|
|
500
|
-
var tmp0_safe_receiver = this.
|
|
539
|
+
var tmp0_safe_receiver = this.fl_1;
|
|
501
540
|
var tmp;
|
|
502
541
|
if (tmp0_safe_receiver == null) {
|
|
503
542
|
tmp = null;
|
|
@@ -506,7 +545,7 @@ class RootNode {
|
|
|
506
545
|
tmp = '{' + tmp0_safe_receiver + '}';
|
|
507
546
|
}
|
|
508
547
|
var tmp_0 = tmp;
|
|
509
|
-
var tmp1_safe_receiver = this.
|
|
548
|
+
var tmp1_safe_receiver = this.hl_1;
|
|
510
549
|
var tmp_1;
|
|
511
550
|
if (tmp1_safe_receiver == null) {
|
|
512
551
|
tmp_1 = null;
|
|
@@ -517,18 +556,18 @@ class RootNode {
|
|
|
517
556
|
return '' + tmp_0 + tmp_1;
|
|
518
557
|
}
|
|
519
558
|
vk(move_0, initialComment, comment, endLineComment, suffixAnnotations, notation) {
|
|
520
|
-
if (immutable(this.
|
|
521
|
-
Companion_getInstance_1().vj_1.
|
|
559
|
+
if (immutable(this.ml_1)) {
|
|
560
|
+
Companion_getInstance_1().vj_1.ol('trying to make move ' + move_0 + ' on immutable game id=' + toString_0(this.ml_1.lk_1));
|
|
522
561
|
return this;
|
|
523
562
|
}
|
|
524
|
-
if (this.
|
|
525
|
-
throw GameModeException.
|
|
563
|
+
if (this.gl_1.b1() === 1 && this.ml_1.dk_1.equals(GameMode_MATCH_getInstance())) {
|
|
564
|
+
throw GameModeException.sl('Match mode cannot accept variations (RAVs); only the main line is allowed.');
|
|
526
565
|
}
|
|
527
566
|
try {
|
|
528
567
|
var tmp;
|
|
529
568
|
switch (notation.m2_1) {
|
|
530
569
|
case 1:
|
|
531
|
-
tmp = sanToMove(this.
|
|
570
|
+
tmp = sanToMove(this.el_1, move_0);
|
|
532
571
|
break;
|
|
533
572
|
case 0:
|
|
534
573
|
tmp = moveOf_2(move_0);
|
|
@@ -538,22 +577,22 @@ class RootNode {
|
|
|
538
577
|
break;
|
|
539
578
|
}
|
|
540
579
|
var m = tmp;
|
|
541
|
-
var child = new MoveNode(this.
|
|
542
|
-
this.
|
|
543
|
-
if (this.
|
|
544
|
-
if (this.
|
|
545
|
-
this.
|
|
580
|
+
var child = new MoveNode(this.ml_1, move(this.el_1, m), m, initialComment, comment, endLineComment, suffixAnnotations, this);
|
|
581
|
+
this.gl_1.k(child);
|
|
582
|
+
if (this.gl_1.b1() === 1) {
|
|
583
|
+
if (this.ml_1.dk_1.equals(GameMode_MATCH_getInstance())) {
|
|
584
|
+
this.ml_1.tl();
|
|
546
585
|
}
|
|
547
|
-
this.
|
|
548
|
-
this.
|
|
549
|
-
this.
|
|
550
|
-
this.
|
|
586
|
+
this.ml_1.ul(child);
|
|
587
|
+
this.ml_1.vl(child);
|
|
588
|
+
this.ml_1.wl(child);
|
|
589
|
+
this.ml_1.xl(child);
|
|
551
590
|
}
|
|
552
591
|
return child;
|
|
553
592
|
} catch ($p) {
|
|
554
593
|
if ($p instanceof MoveException) {
|
|
555
594
|
var e = $p;
|
|
556
|
-
Companion_getInstance_1().vj_1.
|
|
595
|
+
Companion_getInstance_1().vj_1.yl(e);
|
|
557
596
|
return this;
|
|
558
597
|
} else {
|
|
559
598
|
throw $p;
|
|
@@ -565,12 +604,12 @@ class RootNode {
|
|
|
565
604
|
}
|
|
566
605
|
cl(parent) {
|
|
567
606
|
// Inline function 'kotlin.apply' call
|
|
568
|
-
var this_0 = new RootNode(this.
|
|
569
|
-
this_0.
|
|
570
|
-
this_0.
|
|
571
|
-
this_0.
|
|
607
|
+
var this_0 = new RootNode(this.ml_1, this.el_1);
|
|
608
|
+
this_0.fl_1 = this.fl_1;
|
|
609
|
+
this_0.hl_1 = this.hl_1;
|
|
610
|
+
this_0.nl(this.il_1);
|
|
572
611
|
// Inline function 'kotlin.collections.map' call
|
|
573
|
-
var this_1 = this.
|
|
612
|
+
var this_1 = this.gl_1;
|
|
574
613
|
// Inline function 'kotlin.collections.mapTo' call
|
|
575
614
|
var destination = ArrayList.l5(collectionSizeOrDefault(this_1, 10));
|
|
576
615
|
var _iterator__ex2g4s = this_1.x();
|
|
@@ -579,7 +618,7 @@ class RootNode {
|
|
|
579
618
|
var tmp$ret$0 = item.cl(this_0);
|
|
580
619
|
destination.k(tmp$ret$0);
|
|
581
620
|
}
|
|
582
|
-
this_0.
|
|
621
|
+
this_0.gl_1.b4(destination);
|
|
583
622
|
return this_0;
|
|
584
623
|
}
|
|
585
624
|
}
|
|
@@ -653,7 +692,7 @@ class MoveNode {
|
|
|
653
692
|
}
|
|
654
693
|
vk(move_0, initialComment, comment, endLineComment, suffixAnnotations, notation) {
|
|
655
694
|
if (immutable(this.vi_1)) {
|
|
656
|
-
Companion_getInstance_1().vj_1.
|
|
695
|
+
Companion_getInstance_1().vj_1.ol('trying to make move ' + move_0 + ' on immutable game id=' + toString_0(this.vi_1.lk_1));
|
|
657
696
|
return this;
|
|
658
697
|
}
|
|
659
698
|
var tmp;
|
|
@@ -664,7 +703,7 @@ class MoveNode {
|
|
|
664
703
|
tmp = false;
|
|
665
704
|
}
|
|
666
705
|
if (tmp) {
|
|
667
|
-
throw GameModeException.
|
|
706
|
+
throw GameModeException.sl('Match mode cannot accept variations. Only the main line is allowed.');
|
|
668
707
|
}
|
|
669
708
|
try {
|
|
670
709
|
var tmp_0;
|
|
@@ -687,18 +726,18 @@ class MoveNode {
|
|
|
687
726
|
}
|
|
688
727
|
if (last(asSequence_1(this.vi_1.x())) === child) {
|
|
689
728
|
if (this.vi_1.dk_1.equals(GameMode_MATCH_getInstance())) {
|
|
690
|
-
this.vi_1.
|
|
729
|
+
this.vi_1.tl();
|
|
691
730
|
}
|
|
692
|
-
this.vi_1.tl(child);
|
|
693
731
|
this.vi_1.ul(child);
|
|
694
732
|
this.vi_1.vl(child);
|
|
695
733
|
this.vi_1.wl(child);
|
|
734
|
+
this.vi_1.xl(child);
|
|
696
735
|
}
|
|
697
736
|
return child;
|
|
698
737
|
} catch ($p) {
|
|
699
738
|
if ($p instanceof MoveException) {
|
|
700
739
|
var e = $p;
|
|
701
|
-
Companion_getInstance_1().vj_1.
|
|
740
|
+
Companion_getInstance_1().vj_1.yl(e);
|
|
702
741
|
return this;
|
|
703
742
|
} else {
|
|
704
743
|
throw $p;
|
|
@@ -752,7 +791,7 @@ class MoveNode {
|
|
|
752
791
|
var tmp2_elvis_lhs = tmp_0;
|
|
753
792
|
var tmp_1;
|
|
754
793
|
if (tmp2_elvis_lhs == null) {
|
|
755
|
-
throw Companion_getInstance_1().vj_1.
|
|
794
|
+
throw Companion_getInstance_1().vj_1.yl(UnexpectedGameInternalError.zi("node parent can't be null"));
|
|
756
795
|
} else {
|
|
757
796
|
tmp_1 = tmp2_elvis_lhs;
|
|
758
797
|
}
|
|
@@ -770,23 +809,23 @@ class FiftyMovesRuleMode extends Enum {}
|
|
|
770
809
|
class Result extends Enum {
|
|
771
810
|
constructor(name, ordinal, str) {
|
|
772
811
|
super(name, ordinal);
|
|
773
|
-
this.
|
|
812
|
+
this.bm_1 = str;
|
|
774
813
|
}
|
|
775
814
|
}
|
|
776
815
|
class NodeIterator {
|
|
777
816
|
constructor(curr) {
|
|
778
|
-
this.
|
|
817
|
+
this.cm_1 = curr;
|
|
779
818
|
}
|
|
780
819
|
a1() {
|
|
781
|
-
var aux = this.
|
|
782
|
-
var tmp1_safe_receiver = this.
|
|
820
|
+
var aux = this.cm_1;
|
|
821
|
+
var tmp1_safe_receiver = this.cm_1;
|
|
783
822
|
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.al();
|
|
784
823
|
if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
|
|
785
824
|
var tmp = this;
|
|
786
|
-
var tmp0_safe_receiver = this.
|
|
787
|
-
tmp.
|
|
825
|
+
var tmp0_safe_receiver = this.cm_1;
|
|
826
|
+
tmp.cm_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bj().c1(0);
|
|
788
827
|
} else {
|
|
789
|
-
this.
|
|
828
|
+
this.cm_1 = null;
|
|
790
829
|
}
|
|
791
830
|
var tmp_0;
|
|
792
831
|
if (aux == null) {
|
|
@@ -797,19 +836,19 @@ class NodeIterator {
|
|
|
797
836
|
return tmp_0;
|
|
798
837
|
}
|
|
799
838
|
z() {
|
|
800
|
-
return !(this.
|
|
839
|
+
return !(this.cm_1 == null);
|
|
801
840
|
}
|
|
802
841
|
}
|
|
803
842
|
class Repetitions {
|
|
804
843
|
constructor() {
|
|
805
844
|
var tmp = this;
|
|
806
845
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
807
|
-
tmp.
|
|
846
|
+
tmp.dm_1 = LinkedHashMap.v8();
|
|
808
847
|
}
|
|
809
|
-
|
|
810
|
-
var tmp0 = this.
|
|
848
|
+
em(node) {
|
|
849
|
+
var tmp0 = this.dm_1;
|
|
811
850
|
var tmp2 = node.uj();
|
|
812
|
-
var tmp0_safe_receiver = this.
|
|
851
|
+
var tmp0_safe_receiver = this.dm_1.j2(node.uj());
|
|
813
852
|
var tmp;
|
|
814
853
|
if (tmp0_safe_receiver == null) {
|
|
815
854
|
tmp = null;
|
|
@@ -821,11 +860,11 @@ class Repetitions {
|
|
|
821
860
|
// Inline function 'kotlin.collections.set' call
|
|
822
861
|
var value = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
|
|
823
862
|
tmp0.f5(tmp2, value);
|
|
824
|
-
var tmp2_elvis_lhs = this.
|
|
863
|
+
var tmp2_elvis_lhs = this.dm_1.j2(node.uj());
|
|
825
864
|
return tmp2_elvis_lhs == null ? 1 : tmp2_elvis_lhs;
|
|
826
865
|
}
|
|
827
|
-
|
|
828
|
-
var tmp = asSequence(this.
|
|
866
|
+
fm(node) {
|
|
867
|
+
var tmp = asSequence(this.dm_1.k2());
|
|
829
868
|
var tmp0 = filter(tmp, Game$Repetitions$warning$lambda);
|
|
830
869
|
var tmp$ret$5;
|
|
831
870
|
$l$block: {
|
|
@@ -863,79 +902,79 @@ class UnexpectedGameInternalError extends RuntimeException {
|
|
|
863
902
|
}
|
|
864
903
|
}
|
|
865
904
|
class GameModeException extends RuntimeException {
|
|
866
|
-
static
|
|
905
|
+
static sl(msg) {
|
|
867
906
|
var $this = this.l7(msg);
|
|
868
|
-
captureStack($this, $this.
|
|
907
|
+
captureStack($this, $this.rl_1);
|
|
869
908
|
return $this;
|
|
870
909
|
}
|
|
871
910
|
}
|
|
872
911
|
class Game {
|
|
873
|
-
|
|
912
|
+
gm(value) {
|
|
874
913
|
if (immutable(this)) {
|
|
875
914
|
return Unit_instance;
|
|
876
915
|
}
|
|
877
916
|
this.wj_1 = value;
|
|
878
917
|
}
|
|
879
|
-
|
|
918
|
+
hm(value) {
|
|
880
919
|
if (immutable(this)) {
|
|
881
920
|
return Unit_instance;
|
|
882
921
|
}
|
|
883
922
|
this.yj_1 = value;
|
|
884
923
|
}
|
|
885
|
-
|
|
924
|
+
im(value) {
|
|
886
925
|
if (immutable(this)) {
|
|
887
926
|
return Unit_instance;
|
|
888
927
|
}
|
|
889
928
|
this.zj_1 = value;
|
|
890
929
|
}
|
|
891
|
-
|
|
930
|
+
jm(value) {
|
|
892
931
|
if (immutable(this)) {
|
|
893
932
|
return Unit_instance;
|
|
894
933
|
}
|
|
895
934
|
this.ak_1 = value;
|
|
896
935
|
}
|
|
897
|
-
|
|
936
|
+
km(value) {
|
|
898
937
|
if (immutable(this)) {
|
|
899
938
|
return Unit_instance;
|
|
900
939
|
}
|
|
901
940
|
this.bk_1 = value;
|
|
902
941
|
}
|
|
903
|
-
|
|
942
|
+
lm(value) {
|
|
904
943
|
if (immutable(this)) {
|
|
905
944
|
return Unit_instance;
|
|
906
945
|
}
|
|
907
946
|
this.ck_1 = value;
|
|
908
947
|
}
|
|
909
|
-
|
|
948
|
+
mm(value) {
|
|
910
949
|
if (immutable(this)) {
|
|
911
950
|
return Unit_instance;
|
|
912
951
|
}
|
|
913
952
|
this.ek_1 = value;
|
|
914
953
|
}
|
|
915
|
-
|
|
954
|
+
nm(value) {
|
|
916
955
|
if (immutable(this)) {
|
|
917
956
|
return Unit_instance;
|
|
918
957
|
}
|
|
919
958
|
var tmp0 = this.xj_1;
|
|
920
|
-
var tmp1_elvis_lhs = value == null ? null : value.
|
|
959
|
+
var tmp1_elvis_lhs = value == null ? null : value.bm_1;
|
|
921
960
|
// Inline function 'kotlin.collections.set' call
|
|
922
961
|
var value_0 = tmp1_elvis_lhs == null ? 'unknown' : tmp1_elvis_lhs;
|
|
923
962
|
tmp0.f5('result', value_0);
|
|
924
963
|
this.fk_1 = value;
|
|
925
964
|
}
|
|
926
|
-
|
|
965
|
+
om(value) {
|
|
927
966
|
if (immutable(this)) {
|
|
928
967
|
return Unit_instance;
|
|
929
968
|
}
|
|
930
969
|
this.jk_1 = value;
|
|
931
970
|
}
|
|
932
|
-
|
|
971
|
+
pm(value) {
|
|
933
972
|
if (immutable(this)) {
|
|
934
973
|
return Unit_instance;
|
|
935
974
|
}
|
|
936
975
|
this.kk_1 = value;
|
|
937
976
|
}
|
|
938
|
-
static
|
|
977
|
+
static qm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, root, idSupplier) {
|
|
939
978
|
Companion_getInstance_1();
|
|
940
979
|
root = root === VOID ? null : root;
|
|
941
980
|
var tmp;
|
|
@@ -948,7 +987,7 @@ class Game {
|
|
|
948
987
|
var $this = createThis(this);
|
|
949
988
|
init_io_github_lunalobos_chess4kt_Game($this);
|
|
950
989
|
if (!(root == null)) {
|
|
951
|
-
$this.
|
|
990
|
+
$this.gm(root);
|
|
952
991
|
} else {
|
|
953
992
|
var tmp0_safe_receiver = tags.j2('fen');
|
|
954
993
|
var tmp_0;
|
|
@@ -959,7 +998,7 @@ class Game {
|
|
|
959
998
|
tmp_0 = positionOf_0(tmp0_safe_receiver);
|
|
960
999
|
}
|
|
961
1000
|
var tmp1_elvis_lhs = tmp_0;
|
|
962
|
-
$this.
|
|
1001
|
+
$this.gm(new RootNode($this, tmp1_elvis_lhs == null ? positionOf() : tmp1_elvis_lhs));
|
|
963
1002
|
}
|
|
964
1003
|
$this.dk_1 = gameMode;
|
|
965
1004
|
$this.gk_1 = threeRepetitionsMode;
|
|
@@ -974,7 +1013,7 @@ class Game {
|
|
|
974
1013
|
tmp0.f5('id', value);
|
|
975
1014
|
return $this;
|
|
976
1015
|
}
|
|
977
|
-
static
|
|
1016
|
+
static rm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier) {
|
|
978
1017
|
Companion_getInstance_1();
|
|
979
1018
|
var tmp;
|
|
980
1019
|
if (idSupplier === VOID) {
|
|
@@ -994,7 +1033,7 @@ class Game {
|
|
|
994
1033
|
tmp_0 = positionOf_0(tmp0_safe_receiver);
|
|
995
1034
|
}
|
|
996
1035
|
var tmp1_elvis_lhs = tmp_0;
|
|
997
|
-
$this.
|
|
1036
|
+
$this.gm(new RootNode($this, tmp1_elvis_lhs == null ? positionOf() : tmp1_elvis_lhs));
|
|
998
1037
|
$this.dk_1 = gameMode;
|
|
999
1038
|
$this.gk_1 = threeRepetitionsMode;
|
|
1000
1039
|
$this.hk_1 = fiftyMovesRuleMode;
|
|
@@ -1008,22 +1047,22 @@ class Game {
|
|
|
1008
1047
|
tmp0.f5('id', value);
|
|
1009
1048
|
return $this;
|
|
1010
1049
|
}
|
|
1011
|
-
|
|
1012
|
-
var count = this.ik_1.
|
|
1050
|
+
ul(node) {
|
|
1051
|
+
var count = this.ik_1.em(node);
|
|
1013
1052
|
if (this.dk_1.equals(GameMode_MATCH_getInstance()) && count === 5) {
|
|
1014
|
-
this.
|
|
1015
|
-
this.
|
|
1016
|
-
this.
|
|
1053
|
+
this.im(true);
|
|
1054
|
+
this.pm('five repetitions');
|
|
1055
|
+
this.nm(Result_DRAW_getInstance());
|
|
1017
1056
|
}
|
|
1018
1057
|
if (count === 3) {
|
|
1019
1058
|
switch (this.gk_1.m2_1) {
|
|
1020
1059
|
case 2:
|
|
1021
|
-
this.
|
|
1060
|
+
this.hm(true);
|
|
1022
1061
|
break;
|
|
1023
1062
|
case 1:
|
|
1024
|
-
this.
|
|
1025
|
-
this.
|
|
1026
|
-
this.
|
|
1063
|
+
this.hm(true);
|
|
1064
|
+
this.pm('three repetitions');
|
|
1065
|
+
this.nm(Result_DRAW_getInstance());
|
|
1027
1066
|
break;
|
|
1028
1067
|
case 0:
|
|
1029
1068
|
break;
|
|
@@ -1032,15 +1071,15 @@ class Game {
|
|
|
1032
1071
|
break;
|
|
1033
1072
|
}
|
|
1034
1073
|
} else {
|
|
1035
|
-
this.
|
|
1074
|
+
this.hm(false);
|
|
1036
1075
|
}
|
|
1037
|
-
if (this.ik_1.
|
|
1076
|
+
if (this.ik_1.fm(node)) {
|
|
1038
1077
|
switch (this.gk_1.m2_1) {
|
|
1039
1078
|
case 2:
|
|
1040
|
-
this.
|
|
1079
|
+
this.jm(true);
|
|
1041
1080
|
break;
|
|
1042
1081
|
case 1:
|
|
1043
|
-
this.
|
|
1082
|
+
this.jm(true);
|
|
1044
1083
|
break;
|
|
1045
1084
|
case 0:
|
|
1046
1085
|
break;
|
|
@@ -1050,40 +1089,40 @@ class Game {
|
|
|
1050
1089
|
}
|
|
1051
1090
|
}
|
|
1052
1091
|
}
|
|
1053
|
-
|
|
1054
|
-
if (node.uj().
|
|
1092
|
+
wl(node) {
|
|
1093
|
+
if (node.uj().sm()) {
|
|
1055
1094
|
switch (this.hk_1.m2_1) {
|
|
1056
1095
|
case 0:
|
|
1057
1096
|
break;
|
|
1058
1097
|
case 2:
|
|
1059
|
-
this.
|
|
1098
|
+
this.km(true);
|
|
1060
1099
|
break;
|
|
1061
1100
|
case 1:
|
|
1062
|
-
this.
|
|
1063
|
-
this.
|
|
1101
|
+
this.km(true);
|
|
1102
|
+
this.nm(Result_DRAW_getInstance());
|
|
1064
1103
|
break;
|
|
1065
1104
|
default:
|
|
1066
1105
|
noWhenBranchMatchedException();
|
|
1067
1106
|
break;
|
|
1068
1107
|
}
|
|
1069
1108
|
} else {
|
|
1070
|
-
this.
|
|
1109
|
+
this.km(false);
|
|
1071
1110
|
}
|
|
1072
1111
|
}
|
|
1073
|
-
|
|
1112
|
+
xl(node) {
|
|
1074
1113
|
if (node.uj().mj_1 === 75) {
|
|
1075
|
-
this.
|
|
1076
|
-
this.
|
|
1077
|
-
this.
|
|
1114
|
+
this.lm(true);
|
|
1115
|
+
this.pm('75 moves rule');
|
|
1116
|
+
this.nm(Result_DRAW_getInstance());
|
|
1078
1117
|
}
|
|
1079
1118
|
}
|
|
1080
|
-
|
|
1119
|
+
tl() {
|
|
1081
1120
|
var iterator = this.x();
|
|
1082
1121
|
iterator.a1();
|
|
1083
1122
|
while (iterator.z()) {
|
|
1084
1123
|
var node = iterator.a1();
|
|
1085
1124
|
var tmp0_elvis_lhs = ecoInfo(node.uj());
|
|
1086
|
-
this.
|
|
1125
|
+
this.mm(tmp0_elvis_lhs == null ? this.ek_1 : tmp0_elvis_lhs);
|
|
1087
1126
|
}
|
|
1088
1127
|
var tmp0 = this.xj_1;
|
|
1089
1128
|
var tmp1_safe_receiver = this.ek_1;
|
|
@@ -1098,7 +1137,7 @@ class Game {
|
|
|
1098
1137
|
var value_0 = tmp4_elvis_lhs == null ? 'unknown' : tmp4_elvis_lhs;
|
|
1099
1138
|
tmp0_0.f5('opening', value_0);
|
|
1100
1139
|
}
|
|
1101
|
-
|
|
1140
|
+
vl(node) {
|
|
1102
1141
|
if (get_gameOver(node.uj())) {
|
|
1103
1142
|
var tmp;
|
|
1104
1143
|
if (get_draw(node.uj())) {
|
|
@@ -1108,7 +1147,7 @@ class Game {
|
|
|
1108
1147
|
} else {
|
|
1109
1148
|
tmp = Result_WHITE_WIN_getInstance();
|
|
1110
1149
|
}
|
|
1111
|
-
this.
|
|
1150
|
+
this.nm(tmp);
|
|
1112
1151
|
}
|
|
1113
1152
|
}
|
|
1114
1153
|
toString() {
|
|
@@ -1122,7 +1161,7 @@ class Game {
|
|
|
1122
1161
|
sb.j8(toString(element));
|
|
1123
1162
|
}
|
|
1124
1163
|
var tmp0_safe_receiver = this.fk_1;
|
|
1125
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1164
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bm_1;
|
|
1126
1165
|
var tmp_0 = sb.j8(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
|
|
1127
1166
|
var tmp2_safe_receiver = this.jk_1;
|
|
1128
1167
|
var tmp_1;
|
|
@@ -1149,72 +1188,72 @@ class Game {
|
|
|
1149
1188
|
x() {
|
|
1150
1189
|
return new NodeIterator(this.wj_1);
|
|
1151
1190
|
}
|
|
1152
|
-
|
|
1191
|
+
tm(idSupplier) {
|
|
1153
1192
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1154
1193
|
// Inline function 'kotlin.apply' call
|
|
1155
1194
|
var this_0 = LinkedHashMap.v8();
|
|
1156
1195
|
this_0.g5(this.xj_1);
|
|
1157
1196
|
// Inline function 'kotlin.apply' call
|
|
1158
|
-
var this_1 = Game.
|
|
1159
|
-
this_1.
|
|
1160
|
-
this_1.
|
|
1161
|
-
this_1.
|
|
1162
|
-
this_1.
|
|
1163
|
-
this_1.
|
|
1164
|
-
this_1.
|
|
1197
|
+
var this_1 = Game.qm(this_0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), this.wj_1.cl(null), idSupplier);
|
|
1198
|
+
this_1.om(this.jk_1);
|
|
1199
|
+
this_1.pm(this.kk_1);
|
|
1200
|
+
this_1.mm(this.ek_1);
|
|
1201
|
+
this_1.nm(this.fk_1);
|
|
1202
|
+
this_1.hm(this.yj_1);
|
|
1203
|
+
this_1.km(this.bk_1);
|
|
1165
1204
|
return this_1;
|
|
1166
1205
|
}
|
|
1167
1206
|
}
|
|
1168
1207
|
class KingMoves$allMovesList$delegate$lambda$slambda {
|
|
1169
1208
|
constructor(this$0) {
|
|
1170
|
-
this.
|
|
1209
|
+
this.um_1 = this$0;
|
|
1171
1210
|
}
|
|
1172
|
-
|
|
1211
|
+
hn($this$sequence, $completion) {
|
|
1173
1212
|
return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8.bind(VOID, this, $this$sequence), $completion);
|
|
1174
1213
|
}
|
|
1175
1214
|
w9(p1, $completion) {
|
|
1176
|
-
return this.
|
|
1215
|
+
return this.hn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
1177
1216
|
}
|
|
1178
1217
|
}
|
|
1179
1218
|
class KingMoves {
|
|
1180
1219
|
constructor(kingPiece, originSquare, enemies, regularMoves, castleMoves, regularMoveFunction) {
|
|
1181
|
-
this.
|
|
1182
|
-
this.
|
|
1183
|
-
this.
|
|
1184
|
-
this.
|
|
1185
|
-
this.
|
|
1186
|
-
this.
|
|
1220
|
+
this.vm_1 = kingPiece;
|
|
1221
|
+
this.wm_1 = originSquare;
|
|
1222
|
+
this.xm_1 = enemies;
|
|
1223
|
+
this.ym_1 = regularMoves;
|
|
1224
|
+
this.zm_1 = castleMoves;
|
|
1225
|
+
this.an_1 = regularMoveFunction;
|
|
1187
1226
|
var tmp = this;
|
|
1188
|
-
tmp.
|
|
1227
|
+
tmp.bn_1 = lazy(KingMoves$regularMovesList$delegate$lambda(this));
|
|
1189
1228
|
var tmp_0 = this;
|
|
1190
|
-
tmp_0.
|
|
1191
|
-
this.
|
|
1229
|
+
tmp_0.cn_1 = lazy(KingMoves$castleMovesList$delegate$lambda(this));
|
|
1230
|
+
this.dn_1 = this.ym_1 | this.zm_1;
|
|
1192
1231
|
var tmp_1 = this;
|
|
1193
|
-
tmp_1.
|
|
1232
|
+
tmp_1.en_1 = lazy(KingMoves$allMovesList$delegate$lambda(this));
|
|
1194
1233
|
}
|
|
1195
|
-
|
|
1196
|
-
var tmp0 = this.
|
|
1234
|
+
fn() {
|
|
1235
|
+
var tmp0 = this.bn_1;
|
|
1197
1236
|
var tmp = KProperty1;
|
|
1198
1237
|
// Inline function 'kotlin.getValue' call
|
|
1199
1238
|
getPropertyCallableRef('regularMovesList', 1, tmp, KingMoves$_get_regularMovesList_$ref_1r6ljl(), null);
|
|
1200
1239
|
return tmp0.h2();
|
|
1201
1240
|
}
|
|
1202
|
-
|
|
1203
|
-
var tmp0 = this.
|
|
1241
|
+
gn() {
|
|
1242
|
+
var tmp0 = this.cn_1;
|
|
1204
1243
|
var tmp = KProperty1;
|
|
1205
1244
|
// Inline function 'kotlin.getValue' call
|
|
1206
1245
|
getPropertyCallableRef('castleMovesList', 1, tmp, KingMoves$_get_castleMovesList_$ref_3suu4f(), null);
|
|
1207
1246
|
return tmp0.h2();
|
|
1208
1247
|
}
|
|
1209
|
-
|
|
1210
|
-
var tmp0 = this.
|
|
1248
|
+
in() {
|
|
1249
|
+
var tmp0 = this.en_1;
|
|
1211
1250
|
var tmp = KProperty1;
|
|
1212
1251
|
// Inline function 'kotlin.getValue' call
|
|
1213
1252
|
getPropertyCallableRef('allMovesList', 1, tmp, KingMoves$_get_allMovesList_$ref_go3t84(), null);
|
|
1214
1253
|
return tmp0.h2();
|
|
1215
1254
|
}
|
|
1216
1255
|
toString() {
|
|
1217
|
-
return 'KingMoves(piece=' + get_entries_0().c1(this.
|
|
1256
|
+
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
1257
|
}
|
|
1219
1258
|
}
|
|
1220
1259
|
class Level extends Enum {}
|
|
@@ -1223,7 +1262,7 @@ class Logger {
|
|
|
1223
1262
|
this.ii_1 = name;
|
|
1224
1263
|
this.ji_1 = filterLevel;
|
|
1225
1264
|
}
|
|
1226
|
-
|
|
1265
|
+
jn(message) {
|
|
1227
1266
|
var tmp0_level = Level_DEBUG_getInstance();
|
|
1228
1267
|
log(this, tmp0_level, message);
|
|
1229
1268
|
}
|
|
@@ -1231,50 +1270,50 @@ class Logger {
|
|
|
1231
1270
|
var tmp0_level = Level_INFO_getInstance();
|
|
1232
1271
|
log(this, tmp0_level, message);
|
|
1233
1272
|
}
|
|
1234
|
-
|
|
1273
|
+
ol(message) {
|
|
1235
1274
|
var tmp0_level = Level_WARN_getInstance();
|
|
1236
1275
|
log(this, tmp0_level, message);
|
|
1237
1276
|
}
|
|
1238
|
-
|
|
1277
|
+
kn(message) {
|
|
1239
1278
|
var tmp0_level = Level_ERROR_getInstance();
|
|
1240
1279
|
log(this, tmp0_level, message);
|
|
1241
1280
|
}
|
|
1242
|
-
|
|
1281
|
+
yl(err) {
|
|
1243
1282
|
var tmp0_elvis_lhs = err.message;
|
|
1244
|
-
this.
|
|
1283
|
+
this.kn(tmp0_elvis_lhs == null ? 'none' : tmp0_elvis_lhs);
|
|
1245
1284
|
return err;
|
|
1246
1285
|
}
|
|
1247
|
-
|
|
1286
|
+
ln(message) {
|
|
1248
1287
|
var tmp0_level = Level_FATAL_getInstance();
|
|
1249
1288
|
log(this, tmp0_level, message);
|
|
1250
1289
|
}
|
|
1251
|
-
|
|
1290
|
+
mn(err) {
|
|
1252
1291
|
var tmp0_elvis_lhs = err.message;
|
|
1253
|
-
this.
|
|
1292
|
+
this.ln(tmp0_elvis_lhs == null ? 'none' : tmp0_elvis_lhs);
|
|
1254
1293
|
return err;
|
|
1255
1294
|
}
|
|
1256
|
-
|
|
1295
|
+
nn(t1, t2) {
|
|
1257
1296
|
var ms = subtract(t2.wg(), t1.wg());
|
|
1258
|
-
this.
|
|
1297
|
+
this.jn(this.ii_1 + ' created in ' + ms.toString() + ' ms');
|
|
1259
1298
|
}
|
|
1260
1299
|
}
|
|
1261
1300
|
class Companion_2 {
|
|
1262
1301
|
constructor() {
|
|
1263
1302
|
Companion_instance_2 = this;
|
|
1264
|
-
this.
|
|
1303
|
+
this.on_1 = getLogger('io.github.lunalobos.chess4kt.Move');
|
|
1265
1304
|
}
|
|
1266
1305
|
}
|
|
1267
1306
|
class Move {
|
|
1268
|
-
static
|
|
1307
|
+
static tn(move, origin, promotionPiece) {
|
|
1269
1308
|
Companion_getInstance_2();
|
|
1270
1309
|
promotionPiece = promotionPiece === VOID ? -1 : promotionPiece;
|
|
1271
1310
|
var $this = createThis(this);
|
|
1272
1311
|
init_io_github_lunalobos_chess4kt_Move($this);
|
|
1273
1312
|
if (move === 0n) {
|
|
1274
|
-
throw Companion_getInstance_2().
|
|
1313
|
+
throw Companion_getInstance_2().on_1.mn(RuntimeException.l7('Move mask cannot be zero.'));
|
|
1275
1314
|
}
|
|
1276
1315
|
if (!(0 <= origin ? origin <= 63 : false)) {
|
|
1277
|
-
throw Companion_getInstance_2().
|
|
1316
|
+
throw Companion_getInstance_2().on_1.mn(RuntimeException.l7('Origin square index must be between 0 and 63 (inclusive), but was ' + origin + '.'));
|
|
1278
1317
|
}
|
|
1279
1318
|
var tmp;
|
|
1280
1319
|
if (!(promotionPiece === -1)) {
|
|
@@ -1293,31 +1332,31 @@ class Move {
|
|
|
1293
1332
|
tmp = false;
|
|
1294
1333
|
}
|
|
1295
1334
|
if (tmp) {
|
|
1296
|
-
throw Companion_getInstance_2().
|
|
1335
|
+
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
1336
|
}
|
|
1298
|
-
$this.
|
|
1299
|
-
$this.
|
|
1300
|
-
$this.
|
|
1301
|
-
$this.
|
|
1337
|
+
$this.pn_1 = move;
|
|
1338
|
+
$this.qn_1 = origin;
|
|
1339
|
+
$this.rn_1 = promotionPiece;
|
|
1340
|
+
$this.sn_1 = countTrailingZeroBits(move);
|
|
1302
1341
|
return $this;
|
|
1303
1342
|
}
|
|
1304
|
-
tn() {
|
|
1305
|
-
return Companion_instance_6.c1(this.pn_1);
|
|
1306
|
-
}
|
|
1307
1343
|
un() {
|
|
1308
|
-
return Companion_instance_6.c1(this.
|
|
1344
|
+
return Companion_instance_6.c1(this.qn_1);
|
|
1309
1345
|
}
|
|
1310
1346
|
vn() {
|
|
1347
|
+
return Companion_instance_6.c1(this.sn_1);
|
|
1348
|
+
}
|
|
1349
|
+
wn() {
|
|
1311
1350
|
var tmp;
|
|
1312
|
-
if (this.
|
|
1351
|
+
if (this.rn_1 < 0) {
|
|
1313
1352
|
tmp = Piece_EMPTY_getInstance();
|
|
1314
1353
|
} else {
|
|
1315
|
-
tmp = get_entries_0().c1(this.
|
|
1354
|
+
tmp = get_entries_0().c1(this.rn_1);
|
|
1316
1355
|
}
|
|
1317
1356
|
return tmp;
|
|
1318
1357
|
}
|
|
1319
1358
|
hashCode() {
|
|
1320
|
-
return this.
|
|
1359
|
+
return this.qn_1 | countTrailingZeroBits(this.pn_1) << 6 | (this.rn_1 === -1 ? 0 : this.rn_1 << 12);
|
|
1321
1360
|
}
|
|
1322
1361
|
equals(other) {
|
|
1323
1362
|
if (other == null)
|
|
@@ -1326,32 +1365,32 @@ class Move {
|
|
|
1326
1365
|
return true;
|
|
1327
1366
|
if (!(other instanceof Move))
|
|
1328
1367
|
return false;
|
|
1329
|
-
return this.
|
|
1368
|
+
return this.qn_1 === other.qn_1 && this.pn_1 === other.pn_1 && this.rn_1 === other.rn_1;
|
|
1330
1369
|
}
|
|
1331
1370
|
toString() {
|
|
1332
1371
|
var sb = StringBuilder.u();
|
|
1333
1372
|
// Inline function 'kotlin.text.lowercase' call
|
|
1334
1373
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1335
|
-
var tmp$ret$1 = this.
|
|
1374
|
+
var tmp$ret$1 = this.un().l2_1.toLowerCase();
|
|
1336
1375
|
var tmp = sb.j8(tmp$ret$1);
|
|
1337
1376
|
// Inline function 'kotlin.text.lowercase' call
|
|
1338
1377
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1339
|
-
var tmp$ret$3 = this.
|
|
1378
|
+
var tmp$ret$3 = this.vn().l2_1.toLowerCase();
|
|
1340
1379
|
tmp.j8(tmp$ret$3);
|
|
1341
1380
|
var tmp_0;
|
|
1342
|
-
if (this.
|
|
1381
|
+
if (this.rn_1 === -1) {
|
|
1343
1382
|
tmp_0 = sb.toString();
|
|
1344
1383
|
} else {
|
|
1345
1384
|
// Inline function 'kotlin.text.lowercase' call
|
|
1346
1385
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1347
|
-
var tmp$ret$5 = substring(this.
|
|
1386
|
+
var tmp$ret$5 = substring(this.wn().l2_1, 1).toLowerCase();
|
|
1348
1387
|
tmp_0 = sb.j8(tmp$ret$5).toString();
|
|
1349
1388
|
}
|
|
1350
1389
|
return tmp_0;
|
|
1351
1390
|
}
|
|
1352
1391
|
}
|
|
1353
1392
|
class MoveException extends RuntimeException {
|
|
1354
|
-
static
|
|
1393
|
+
static ao(msg) {
|
|
1355
1394
|
var $this = this.l7(msg);
|
|
1356
1395
|
init_io_github_lunalobos_chess4kt_MoveException($this);
|
|
1357
1396
|
return $this;
|
|
@@ -1359,228 +1398,228 @@ class MoveException extends RuntimeException {
|
|
|
1359
1398
|
}
|
|
1360
1399
|
class MovesInfo$movesList$delegate$lambda$slambda {
|
|
1361
1400
|
constructor(this$0) {
|
|
1362
|
-
this.
|
|
1401
|
+
this.jo_1 = this$0;
|
|
1363
1402
|
}
|
|
1364
|
-
|
|
1403
|
+
hn($this$sequence, $completion) {
|
|
1365
1404
|
return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_0.bind(VOID, this, $this$sequence), $completion);
|
|
1366
1405
|
}
|
|
1367
1406
|
w9(p1, $completion) {
|
|
1368
|
-
return this.
|
|
1407
|
+
return this.hn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
1369
1408
|
}
|
|
1370
1409
|
}
|
|
1371
1410
|
class MovesInfo {
|
|
1372
1411
|
constructor(pawnMoves, knightMoves, bishopMoves, rookMoves, queenMoves, kingMoves) {
|
|
1373
|
-
this.
|
|
1374
|
-
this.
|
|
1375
|
-
this.
|
|
1376
|
-
this.
|
|
1377
|
-
this.
|
|
1378
|
-
this.
|
|
1412
|
+
this.bo_1 = pawnMoves;
|
|
1413
|
+
this.co_1 = knightMoves;
|
|
1414
|
+
this.do_1 = bishopMoves;
|
|
1415
|
+
this.eo_1 = rookMoves;
|
|
1416
|
+
this.fo_1 = queenMoves;
|
|
1417
|
+
this.go_1 = kingMoves;
|
|
1379
1418
|
var tmp = this;
|
|
1380
|
-
tmp.
|
|
1419
|
+
tmp.ho_1 = lazy(MovesInfo$moves$delegate$lambda(this));
|
|
1381
1420
|
var tmp_0 = this;
|
|
1382
|
-
tmp_0.
|
|
1421
|
+
tmp_0.io_1 = lazy(MovesInfo$movesList$delegate$lambda(this));
|
|
1383
1422
|
}
|
|
1384
|
-
|
|
1385
|
-
var tmp0 = this.
|
|
1423
|
+
fp() {
|
|
1424
|
+
var tmp0 = this.ho_1;
|
|
1386
1425
|
var tmp = KProperty1;
|
|
1387
1426
|
// Inline function 'kotlin.getValue' call
|
|
1388
1427
|
getPropertyCallableRef('moves', 1, tmp, MovesInfo$_get_moves_$ref_54hm5y(), null);
|
|
1389
1428
|
return tmp0.h2();
|
|
1390
1429
|
}
|
|
1391
|
-
|
|
1392
|
-
var tmp0 = this.
|
|
1430
|
+
gp() {
|
|
1431
|
+
var tmp0 = this.io_1;
|
|
1393
1432
|
var tmp = KProperty1;
|
|
1394
1433
|
// Inline function 'kotlin.getValue' call
|
|
1395
1434
|
getPropertyCallableRef('movesList', 1, tmp, MovesInfo$_get_movesList_$ref_o79khg(), null);
|
|
1396
1435
|
return tmp0.h2();
|
|
1397
1436
|
}
|
|
1398
1437
|
toString() {
|
|
1399
|
-
return 'MovesInfo(moves = ' + toString(this.
|
|
1438
|
+
return 'MovesInfo(moves = ' + toString(this.gp()) + ')';
|
|
1400
1439
|
}
|
|
1401
1440
|
}
|
|
1402
1441
|
class Notation extends Enum {}
|
|
1403
1442
|
class Companion_3 {
|
|
1404
1443
|
constructor() {
|
|
1405
1444
|
Companion_instance_3 = this;
|
|
1406
|
-
this.
|
|
1445
|
+
this.hp_1 = getLogger('io.github.lunalobos.chess4kt.Parser');
|
|
1407
1446
|
}
|
|
1408
1447
|
}
|
|
1409
1448
|
class ParserException extends RuntimeException {
|
|
1410
|
-
static
|
|
1449
|
+
static lp(msg) {
|
|
1411
1450
|
var $this = this.l7(msg);
|
|
1412
|
-
captureStack($this, $this.
|
|
1451
|
+
captureStack($this, $this.kp_1);
|
|
1413
1452
|
return $this;
|
|
1414
1453
|
}
|
|
1415
1454
|
}
|
|
1416
1455
|
class Parser {
|
|
1417
1456
|
constructor(tokens) {
|
|
1418
1457
|
Companion_getInstance_3();
|
|
1419
|
-
this.
|
|
1458
|
+
this.pp_1 = tokens;
|
|
1420
1459
|
var tmp = this;
|
|
1421
1460
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1422
|
-
tmp.
|
|
1423
|
-
this.
|
|
1424
|
-
this.
|
|
1461
|
+
tmp.rp_1 = LinkedHashMap.v8();
|
|
1462
|
+
this.sp_1 = null;
|
|
1463
|
+
this.tp_1 = this.pp_1.x();
|
|
1425
1464
|
var tmp_0 = this;
|
|
1426
1465
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1427
|
-
tmp_0.
|
|
1466
|
+
tmp_0.up_1 = ArrayList.h1();
|
|
1428
1467
|
var tmp_1 = this;
|
|
1429
1468
|
var tmp_2;
|
|
1430
|
-
if (this.
|
|
1431
|
-
tmp_2 = this.
|
|
1469
|
+
if (this.tp_1.z()) {
|
|
1470
|
+
tmp_2 = this.tp_1.a1();
|
|
1432
1471
|
} else {
|
|
1433
|
-
throw ParserException.
|
|
1472
|
+
throw ParserException.lp('no tokens to parse');
|
|
1434
1473
|
}
|
|
1435
|
-
tmp_1.
|
|
1474
|
+
tmp_1.qp_1 = tmp_2;
|
|
1436
1475
|
}
|
|
1437
|
-
|
|
1476
|
+
vp(idSupplier) {
|
|
1438
1477
|
do {
|
|
1439
1478
|
parseGame(this, idSupplier);
|
|
1440
|
-
this.
|
|
1479
|
+
this.qp_1 = nextTokenOrFail(this, 'error in main function ');
|
|
1441
1480
|
}
|
|
1442
|
-
while (!this.
|
|
1443
|
-
return this.
|
|
1481
|
+
while (!this.qp_1.mp_1.equals(TokenType_EOF_getInstance()));
|
|
1482
|
+
return this.up_1;
|
|
1444
1483
|
}
|
|
1445
1484
|
}
|
|
1446
1485
|
class PawnMoves$allMovesList$delegate$lambda$slambda {
|
|
1447
1486
|
constructor(this$0) {
|
|
1448
|
-
this.
|
|
1487
|
+
this.wp_1 = this$0;
|
|
1449
1488
|
}
|
|
1450
|
-
|
|
1489
|
+
hn($this$sequence, $completion) {
|
|
1451
1490
|
return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_1.bind(VOID, this, $this$sequence), $completion);
|
|
1452
1491
|
}
|
|
1453
1492
|
w9(p1, $completion) {
|
|
1454
|
-
return this.
|
|
1493
|
+
return this.hn(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
1455
1494
|
}
|
|
1456
1495
|
}
|
|
1457
1496
|
class PawnMoves {
|
|
1458
1497
|
constructor(pawnPiece, originSquare, enemies, regularMoves, advanceEpMoves, promotionMoves, epCapture, regularMoveFunction, promotionMoveFunction) {
|
|
1459
|
-
this.
|
|
1460
|
-
this.
|
|
1461
|
-
this.
|
|
1462
|
-
this.
|
|
1463
|
-
this.
|
|
1464
|
-
this.
|
|
1465
|
-
this.
|
|
1466
|
-
this.
|
|
1467
|
-
this.
|
|
1498
|
+
this.ko_1 = pawnPiece;
|
|
1499
|
+
this.lo_1 = originSquare;
|
|
1500
|
+
this.mo_1 = enemies;
|
|
1501
|
+
this.no_1 = regularMoves;
|
|
1502
|
+
this.oo_1 = advanceEpMoves;
|
|
1503
|
+
this.po_1 = promotionMoves;
|
|
1504
|
+
this.qo_1 = epCapture;
|
|
1505
|
+
this.ro_1 = regularMoveFunction;
|
|
1506
|
+
this.so_1 = promotionMoveFunction;
|
|
1468
1507
|
var tmp = this;
|
|
1469
|
-
tmp.
|
|
1508
|
+
tmp.to_1 = lazy(PawnMoves$regularMovesList$delegate$lambda(this));
|
|
1470
1509
|
var tmp_0 = this;
|
|
1471
|
-
tmp_0.
|
|
1510
|
+
tmp_0.uo_1 = lazy(PawnMoves$advanceEpMovesList$delegate$lambda(this));
|
|
1472
1511
|
var tmp_1 = this;
|
|
1473
|
-
tmp_1.
|
|
1512
|
+
tmp_1.vo_1 = lazy(PawnMoves$promotionMovesList$delegate$lambda(this));
|
|
1474
1513
|
var tmp_2 = this;
|
|
1475
|
-
tmp_2.
|
|
1476
|
-
this.
|
|
1514
|
+
tmp_2.wo_1 = lazy(PawnMoves$epCaptureMove$delegate$lambda(this));
|
|
1515
|
+
this.xo_1 = this.no_1 | this.oo_1 | this.po_1 | this.qo_1;
|
|
1477
1516
|
var tmp_3 = this;
|
|
1478
|
-
tmp_3.
|
|
1517
|
+
tmp_3.yo_1 = lazy(PawnMoves$allMovesList$delegate$lambda(this));
|
|
1479
1518
|
}
|
|
1480
|
-
|
|
1481
|
-
var tmp0 = this.
|
|
1519
|
+
fn() {
|
|
1520
|
+
var tmp0 = this.to_1;
|
|
1482
1521
|
var tmp = KProperty1;
|
|
1483
1522
|
// Inline function 'kotlin.getValue' call
|
|
1484
1523
|
getPropertyCallableRef('regularMovesList', 1, tmp, PawnMoves$_get_regularMovesList_$ref_qve2sg(), null);
|
|
1485
1524
|
return tmp0.h2();
|
|
1486
1525
|
}
|
|
1487
|
-
|
|
1488
|
-
var tmp0 = this.
|
|
1526
|
+
xp() {
|
|
1527
|
+
var tmp0 = this.uo_1;
|
|
1489
1528
|
var tmp = KProperty1;
|
|
1490
1529
|
// Inline function 'kotlin.getValue' call
|
|
1491
1530
|
getPropertyCallableRef('advanceEpMovesList', 1, tmp, PawnMoves$_get_advanceEpMovesList_$ref_k5ega7(), null);
|
|
1492
1531
|
return tmp0.h2();
|
|
1493
1532
|
}
|
|
1494
|
-
|
|
1495
|
-
var tmp0 = this.
|
|
1533
|
+
yp() {
|
|
1534
|
+
var tmp0 = this.vo_1;
|
|
1496
1535
|
var tmp = KProperty1;
|
|
1497
1536
|
// Inline function 'kotlin.getValue' call
|
|
1498
1537
|
getPropertyCallableRef('promotionMovesList', 1, tmp, PawnMoves$_get_promotionMovesList_$ref_pb8487(), null);
|
|
1499
1538
|
return tmp0.h2();
|
|
1500
1539
|
}
|
|
1501
|
-
|
|
1502
|
-
var tmp0 = this.
|
|
1540
|
+
zp() {
|
|
1541
|
+
var tmp0 = this.wo_1;
|
|
1503
1542
|
var tmp = KProperty1;
|
|
1504
1543
|
// Inline function 'kotlin.getValue' call
|
|
1505
1544
|
getPropertyCallableRef('epCaptureMove', 1, tmp, PawnMoves$_get_epCaptureMove_$ref_4vz7gq(), null);
|
|
1506
1545
|
return tmp0.h2();
|
|
1507
1546
|
}
|
|
1508
|
-
|
|
1509
|
-
var tmp0 = this.
|
|
1547
|
+
in() {
|
|
1548
|
+
var tmp0 = this.yo_1;
|
|
1510
1549
|
var tmp = KProperty1;
|
|
1511
1550
|
// Inline function 'kotlin.getValue' call
|
|
1512
1551
|
getPropertyCallableRef('allMovesList', 1, tmp, PawnMoves$_get_allMovesList_$ref_s0vg9x(), null);
|
|
1513
1552
|
return tmp0.h2();
|
|
1514
1553
|
}
|
|
1515
1554
|
toString() {
|
|
1516
|
-
return 'PawnMoves(piece=' + get_entries_0().c1(this.
|
|
1555
|
+
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
1556
|
}
|
|
1518
1557
|
}
|
|
1519
1558
|
class Companion_4 {}
|
|
1520
1559
|
class Piece extends Enum {
|
|
1521
1560
|
constructor(name, ordinal, side) {
|
|
1522
1561
|
super(name, ordinal);
|
|
1523
|
-
this.
|
|
1562
|
+
this.cq_1 = side;
|
|
1524
1563
|
}
|
|
1525
1564
|
}
|
|
1526
1565
|
class Companion_5 {
|
|
1527
1566
|
constructor() {
|
|
1528
1567
|
Companion_instance_5 = this;
|
|
1529
|
-
this.
|
|
1568
|
+
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
1569
|
}
|
|
1531
1570
|
}
|
|
1532
1571
|
class Position {
|
|
1533
|
-
|
|
1572
|
+
fq() {
|
|
1534
1573
|
return copyOf(this.ej_1);
|
|
1535
1574
|
}
|
|
1536
|
-
|
|
1537
|
-
return get_movesInfo()(this.
|
|
1575
|
+
eq() {
|
|
1576
|
+
return get_movesInfo()(this.fq(), this.fj_1, this.hj_1, this.ij_1, this.jj_1, this.kj_1, this.gj_1);
|
|
1538
1577
|
}
|
|
1539
|
-
|
|
1578
|
+
gq() {
|
|
1540
1579
|
var tmp0 = this.oj_1;
|
|
1541
1580
|
var tmp = KProperty1;
|
|
1542
1581
|
// Inline function 'kotlin.getValue' call
|
|
1543
1582
|
getPropertyCallableRef('check', 1, tmp, Position$_get_check_$ref_tp97h(), null);
|
|
1544
1583
|
return tmp0.h2();
|
|
1545
1584
|
}
|
|
1546
|
-
|
|
1585
|
+
hq() {
|
|
1547
1586
|
var tmp0 = this.pj_1;
|
|
1548
1587
|
var tmp = KProperty1;
|
|
1549
1588
|
// Inline function 'kotlin.getValue' call
|
|
1550
1589
|
getPropertyCallableRef('checkmate', 1, tmp, Position$_get_checkmate_$ref_mwt4hk(), null);
|
|
1551
1590
|
return tmp0.h2();
|
|
1552
1591
|
}
|
|
1553
|
-
|
|
1592
|
+
iq() {
|
|
1554
1593
|
var tmp0 = this.qj_1;
|
|
1555
1594
|
var tmp = KProperty1;
|
|
1556
1595
|
// Inline function 'kotlin.getValue' call
|
|
1557
1596
|
getPropertyCallableRef('stalemate', 1, tmp, Position$_get_stalemate_$ref_l6lqf(), null);
|
|
1558
1597
|
return tmp0.h2();
|
|
1559
1598
|
}
|
|
1560
|
-
|
|
1599
|
+
jq() {
|
|
1561
1600
|
var tmp0 = this.rj_1;
|
|
1562
1601
|
var tmp = KProperty1;
|
|
1563
1602
|
// Inline function 'kotlin.getValue' call
|
|
1564
1603
|
getPropertyCallableRef('lackOfMaterial', 1, tmp, Position$_get_lackOfMaterial_$ref_whrjuu(), null);
|
|
1565
1604
|
return tmp0.h2();
|
|
1566
1605
|
}
|
|
1567
|
-
|
|
1606
|
+
sm() {
|
|
1568
1607
|
var tmp0 = this.sj_1;
|
|
1569
1608
|
var tmp = KProperty1;
|
|
1570
1609
|
// Inline function 'kotlin.getValue' call
|
|
1571
1610
|
getPropertyCallableRef('fiftyMoves', 1, tmp, Position$_get_fiftyMoves_$ref_ima66z(), null);
|
|
1572
1611
|
return tmp0.h2();
|
|
1573
1612
|
}
|
|
1574
|
-
|
|
1613
|
+
kq() {
|
|
1575
1614
|
var tmp0 = this.tj_1;
|
|
1576
1615
|
var tmp = KProperty1;
|
|
1577
1616
|
// Inline function 'kotlin.getValue' call
|
|
1578
1617
|
getPropertyCallableRef('zobrist', 1, tmp, Position$_get_zobrist_$ref_t8al0g(), null);
|
|
1579
1618
|
return tmp0.h2();
|
|
1580
1619
|
}
|
|
1581
|
-
|
|
1620
|
+
lq() {
|
|
1582
1621
|
var sqs = new Int32Array(64);
|
|
1583
|
-
var b = this.
|
|
1622
|
+
var b = this.fq();
|
|
1584
1623
|
var inductionVariable = 0;
|
|
1585
1624
|
if (inductionVariable <= 63)
|
|
1586
1625
|
do {
|
|
@@ -1600,10 +1639,10 @@ class Position {
|
|
|
1600
1639
|
while (inductionVariable <= 63);
|
|
1601
1640
|
return sqs;
|
|
1602
1641
|
}
|
|
1603
|
-
|
|
1604
|
-
return toFen(this.
|
|
1642
|
+
mq() {
|
|
1643
|
+
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
1644
|
}
|
|
1606
|
-
static
|
|
1645
|
+
static nq() {
|
|
1607
1646
|
Companion_getInstance_5();
|
|
1608
1647
|
var $this = createThis(this);
|
|
1609
1648
|
init_io_github_lunalobos_chess4kt_Position($this);
|
|
@@ -1681,7 +1720,7 @@ class Position {
|
|
|
1681
1720
|
$this.mj_1 = 0;
|
|
1682
1721
|
return $this;
|
|
1683
1722
|
}
|
|
1684
|
-
static
|
|
1723
|
+
static oq(bitboards, whiteMove, enPassant, whiteCastleKingside, whiteCastleQueenside, blackCastleKingside, blackCastleQueenside, mc, hm) {
|
|
1685
1724
|
Companion_getInstance_5();
|
|
1686
1725
|
var $this = createThis(this);
|
|
1687
1726
|
init_io_github_lunalobos_chess4kt_Position($this);
|
|
@@ -1696,7 +1735,7 @@ class Position {
|
|
|
1696
1735
|
$this.mj_1 = hm;
|
|
1697
1736
|
return $this;
|
|
1698
1737
|
}
|
|
1699
|
-
static
|
|
1738
|
+
static pq(fen) {
|
|
1700
1739
|
Companion_getInstance_5();
|
|
1701
1740
|
var $this = createThis(this);
|
|
1702
1741
|
init_io_github_lunalobos_chess4kt_Position($this);
|
|
@@ -1715,7 +1754,7 @@ class Position {
|
|
|
1715
1754
|
while (inductionVariable_0 < last) {
|
|
1716
1755
|
var character = chars[inductionVariable_0];
|
|
1717
1756
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1718
|
-
if (Companion_getInstance_5().
|
|
1757
|
+
if (Companion_getInstance_5().dq_1.d2(new Char(character))) {
|
|
1719
1758
|
i = i + toInt(toString_1(character)) | 0;
|
|
1720
1759
|
} else {
|
|
1721
1760
|
if (character === _Char___init__impl__6a9atx(80)) {
|
|
@@ -1816,10 +1855,10 @@ class Position {
|
|
|
1816
1855
|
return $this;
|
|
1817
1856
|
}
|
|
1818
1857
|
hashCode() {
|
|
1819
|
-
return getBigIntHashCode(this.
|
|
1858
|
+
return getBigIntHashCode(this.kq());
|
|
1820
1859
|
}
|
|
1821
1860
|
toString() {
|
|
1822
|
-
return stringRepresentation(this.
|
|
1861
|
+
return stringRepresentation(this.lq(), this.mq());
|
|
1823
1862
|
}
|
|
1824
1863
|
equals(other) {
|
|
1825
1864
|
var tmp;
|
|
@@ -1832,7 +1871,7 @@ class Position {
|
|
|
1832
1871
|
if (!(other instanceof Position)) {
|
|
1833
1872
|
tmp = false;
|
|
1834
1873
|
} else {
|
|
1835
|
-
tmp = (contentEquals(this.
|
|
1874
|
+
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
1875
|
}
|
|
1837
1876
|
}
|
|
1838
1877
|
}
|
|
@@ -1841,23 +1880,23 @@ class Position {
|
|
|
1841
1880
|
}
|
|
1842
1881
|
class RegularPieceMoves {
|
|
1843
1882
|
constructor(piece, square, enemies, moves, moveFunction) {
|
|
1844
|
-
this.
|
|
1845
|
-
this.
|
|
1846
|
-
this.
|
|
1847
|
-
this.
|
|
1848
|
-
this.
|
|
1883
|
+
this.zo_1 = piece;
|
|
1884
|
+
this.ap_1 = square;
|
|
1885
|
+
this.bp_1 = enemies;
|
|
1886
|
+
this.cp_1 = moves;
|
|
1887
|
+
this.dp_1 = moveFunction;
|
|
1849
1888
|
var tmp = this;
|
|
1850
|
-
tmp.
|
|
1889
|
+
tmp.ep_1 = lazy(RegularPieceMoves$allMovesList$delegate$lambda(this));
|
|
1851
1890
|
}
|
|
1852
|
-
|
|
1853
|
-
var tmp0 = this.
|
|
1891
|
+
in() {
|
|
1892
|
+
var tmp0 = this.ep_1;
|
|
1854
1893
|
var tmp = KProperty1;
|
|
1855
1894
|
// Inline function 'kotlin.getValue' call
|
|
1856
1895
|
getPropertyCallableRef('allMovesList', 1, tmp, RegularPieceMoves$_get_allMovesList_$ref_ts1d8v(), null);
|
|
1857
1896
|
return tmp0.h2();
|
|
1858
1897
|
}
|
|
1859
1898
|
toString() {
|
|
1860
|
-
return 'RegularPieceMoves(piece=' + get_entries_0().c1(this.
|
|
1899
|
+
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
1900
|
}
|
|
1862
1901
|
}
|
|
1863
1902
|
class Side extends Enum {}
|
|
@@ -1870,17 +1909,17 @@ class Square extends Enum {}
|
|
|
1870
1909
|
class Token {
|
|
1871
1910
|
constructor(type, value, line) {
|
|
1872
1911
|
line = line === VOID ? 0 : line;
|
|
1873
|
-
this.
|
|
1874
|
-
this.
|
|
1875
|
-
this.
|
|
1912
|
+
this.mp_1 = type;
|
|
1913
|
+
this.np_1 = value;
|
|
1914
|
+
this.op_1 = line;
|
|
1876
1915
|
}
|
|
1877
1916
|
toString() {
|
|
1878
|
-
return 'Token(type=' + this.
|
|
1917
|
+
return 'Token(type=' + this.mp_1.toString() + ', value=' + this.np_1 + ', line=' + this.op_1 + ')';
|
|
1879
1918
|
}
|
|
1880
1919
|
hashCode() {
|
|
1881
|
-
var result = this.
|
|
1882
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1883
|
-
result = imul(result, 31) + this.
|
|
1920
|
+
var result = this.mp_1.hashCode();
|
|
1921
|
+
result = imul(result, 31) + getStringHashCode(this.np_1) | 0;
|
|
1922
|
+
result = imul(result, 31) + this.op_1 | 0;
|
|
1884
1923
|
return result;
|
|
1885
1924
|
}
|
|
1886
1925
|
equals(other) {
|
|
@@ -1888,28 +1927,28 @@ class Token {
|
|
|
1888
1927
|
return true;
|
|
1889
1928
|
if (!(other instanceof Token))
|
|
1890
1929
|
return false;
|
|
1891
|
-
if (!this.
|
|
1892
|
-
return false;
|
|
1893
|
-
if (!(this.mp_1 === other.mp_1))
|
|
1930
|
+
if (!this.mp_1.equals(other.mp_1))
|
|
1894
1931
|
return false;
|
|
1895
1932
|
if (!(this.np_1 === other.np_1))
|
|
1896
1933
|
return false;
|
|
1934
|
+
if (!(this.op_1 === other.op_1))
|
|
1935
|
+
return false;
|
|
1897
1936
|
return true;
|
|
1898
1937
|
}
|
|
1899
1938
|
}
|
|
1900
1939
|
class TokenType extends Enum {}
|
|
1901
1940
|
class Tokenizer {
|
|
1902
1941
|
constructor(pgnInput) {
|
|
1903
|
-
this.
|
|
1904
|
-
this.
|
|
1905
|
-
this.
|
|
1942
|
+
this.qq_1 = pgnInput;
|
|
1943
|
+
this.rq_1 = 0;
|
|
1944
|
+
this.sq_1 = 1;
|
|
1906
1945
|
var tmp = this;
|
|
1907
1946
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1908
|
-
tmp.
|
|
1947
|
+
tmp.tq_1 = ArrayList.h1();
|
|
1909
1948
|
}
|
|
1910
|
-
|
|
1911
|
-
while (this.
|
|
1912
|
-
var char = charCodeAt(this.
|
|
1949
|
+
uq() {
|
|
1950
|
+
while (this.rq_1 < this.qq_1.length) {
|
|
1951
|
+
var char = charCodeAt(this.qq_1, this.rq_1);
|
|
1913
1952
|
if (isWhitespace(char)) {
|
|
1914
1953
|
consumeWhitespace(this);
|
|
1915
1954
|
} else if (char === _Char___init__impl__6a9atx(91)) {
|
|
@@ -1937,15 +1976,15 @@ class Tokenizer {
|
|
|
1937
1976
|
} 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
1977
|
consumeSymbol(this);
|
|
1939
1978
|
} else {
|
|
1940
|
-
this.
|
|
1979
|
+
this.rq_1 = this.rq_1 + 1 | 0;
|
|
1941
1980
|
}
|
|
1942
1981
|
}
|
|
1943
|
-
this.
|
|
1944
|
-
return this.
|
|
1982
|
+
this.tq_1.k(new Token(TokenType_EOF_getInstance(), '', this.sq_1));
|
|
1983
|
+
return this.tq_1;
|
|
1945
1984
|
}
|
|
1946
1985
|
}
|
|
1947
1986
|
class Tuple {
|
|
1948
|
-
static
|
|
1987
|
+
static vq(v1, v2) {
|
|
1949
1988
|
var $this = createThis(this);
|
|
1950
1989
|
init_io_github_lunalobos_chess4kt_Tuple($this);
|
|
1951
1990
|
$this.pk_1 = v1;
|
|
@@ -1983,6 +2022,18 @@ class Tuple {
|
|
|
1983
2022
|
return tmp;
|
|
1984
2023
|
}
|
|
1985
2024
|
}
|
|
2025
|
+
class bitboardToSequence$slambda {
|
|
2026
|
+
constructor($bitboard, $entitiesFactory) {
|
|
2027
|
+
this.wq_1 = $bitboard;
|
|
2028
|
+
this.xq_1 = $entitiesFactory;
|
|
2029
|
+
}
|
|
2030
|
+
yq($this$sequence, $completion) {
|
|
2031
|
+
return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_2.bind(VOID, this, $this$sequence), $completion);
|
|
2032
|
+
}
|
|
2033
|
+
w9(p1, $completion) {
|
|
2034
|
+
return this.yq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
1986
2037
|
class Companion_7 {
|
|
1987
2038
|
fromSquares(squares) {
|
|
1988
2039
|
var value = 0n;
|
|
@@ -2001,11 +2052,11 @@ class Companion_7 {
|
|
|
2001
2052
|
}
|
|
2002
2053
|
class Bitboard {
|
|
2003
2054
|
constructor(value) {
|
|
2004
|
-
this.
|
|
2055
|
+
this.zq_1 = value;
|
|
2005
2056
|
}
|
|
2006
2057
|
toString() {
|
|
2007
2058
|
var sb = StringBuilder.n8(500);
|
|
2008
|
-
var inverted = reverse(Companion_instance_7, this.
|
|
2059
|
+
var inverted = reverse(Companion_instance_7, this.zq_1);
|
|
2009
2060
|
var mask = 255n;
|
|
2010
2061
|
sb.j8('\n+---+---+---+---+---+---+---+---+ \n');
|
|
2011
2062
|
var inductionVariable = 0;
|
|
@@ -2035,70 +2086,73 @@ class Bitboard {
|
|
|
2035
2086
|
return sb.toString();
|
|
2036
2087
|
}
|
|
2037
2088
|
peekLastBit() {
|
|
2038
|
-
return new Bitboard(takeLowestOneBit(this.
|
|
2089
|
+
return new Bitboard(takeLowestOneBit(this.zq_1));
|
|
2039
2090
|
}
|
|
2040
2091
|
peekFirstBit() {
|
|
2041
|
-
return new Bitboard(takeHighestOneBit(this.
|
|
2092
|
+
return new Bitboard(takeHighestOneBit(this.zq_1));
|
|
2042
2093
|
}
|
|
2043
2094
|
trailingZeros() {
|
|
2044
|
-
return countTrailingZeroBits(this.
|
|
2095
|
+
return countTrailingZeroBits(this.zq_1);
|
|
2045
2096
|
}
|
|
2046
2097
|
leadingZeros() {
|
|
2047
|
-
return countLeadingZeroBits(this.
|
|
2098
|
+
return countLeadingZeroBits(this.zq_1);
|
|
2048
2099
|
}
|
|
2049
2100
|
and(other) {
|
|
2050
|
-
return new Bitboard(this.
|
|
2101
|
+
return new Bitboard(this.zq_1 & other.zq_1);
|
|
2051
2102
|
}
|
|
2052
2103
|
or(other) {
|
|
2053
|
-
return new Bitboard(this.
|
|
2104
|
+
return new Bitboard(this.zq_1 | other.zq_1);
|
|
2054
2105
|
}
|
|
2055
2106
|
xor(other) {
|
|
2056
|
-
return new Bitboard(this.
|
|
2107
|
+
return new Bitboard(this.zq_1 ^ other.zq_1);
|
|
2057
2108
|
}
|
|
2058
2109
|
inv() {
|
|
2059
|
-
return new Bitboard(~this.
|
|
2110
|
+
return new Bitboard(~this.zq_1);
|
|
2060
2111
|
}
|
|
2061
2112
|
shl(i) {
|
|
2062
|
-
return new Bitboard(shiftLeft(this.
|
|
2113
|
+
return new Bitboard(shiftLeft(this.zq_1, i));
|
|
2063
2114
|
}
|
|
2064
2115
|
ushr(i) {
|
|
2065
|
-
return new Bitboard(shiftRightUnsigned(this.
|
|
2116
|
+
return new Bitboard(shiftRightUnsigned(this.zq_1, i));
|
|
2117
|
+
}
|
|
2118
|
+
toArray() {
|
|
2119
|
+
return toList(bitboardToSequence(this.zq_1, Bitboard$toArray$lambda)).e2();
|
|
2066
2120
|
}
|
|
2067
2121
|
}
|
|
2068
2122
|
class EcoInfo_0 {
|
|
2069
2123
|
constructor(backedEcoInfo) {
|
|
2070
|
-
this.
|
|
2124
|
+
this.ar_1 = backedEcoInfo;
|
|
2071
2125
|
}
|
|
2072
|
-
|
|
2073
|
-
return this.
|
|
2126
|
+
br() {
|
|
2127
|
+
return this.ar_1;
|
|
2074
2128
|
}
|
|
2075
|
-
|
|
2076
|
-
return this.
|
|
2129
|
+
cr() {
|
|
2130
|
+
return this.ar_1.mi_1;
|
|
2077
2131
|
}
|
|
2078
|
-
|
|
2079
|
-
return this.
|
|
2132
|
+
dr() {
|
|
2133
|
+
return this.ar_1.li_1;
|
|
2080
2134
|
}
|
|
2081
2135
|
get name() {
|
|
2082
|
-
return this.
|
|
2136
|
+
return this.cr();
|
|
2083
2137
|
}
|
|
2084
2138
|
get eco() {
|
|
2085
|
-
return this.
|
|
2139
|
+
return this.dr();
|
|
2086
2140
|
}
|
|
2087
2141
|
}
|
|
2088
2142
|
class Game_0 {
|
|
2089
2143
|
constructor(backedGame) {
|
|
2090
|
-
this.
|
|
2091
|
-
this.root = new Node_0(this.
|
|
2092
|
-
this.id = this.
|
|
2144
|
+
this.er_1 = backedGame;
|
|
2145
|
+
this.root = new Node_0(this.er_1.wj_1);
|
|
2146
|
+
this.id = this.er_1.lk_1;
|
|
2093
2147
|
}
|
|
2094
|
-
|
|
2148
|
+
fr() {
|
|
2095
2149
|
return this.root;
|
|
2096
2150
|
}
|
|
2097
|
-
|
|
2098
|
-
this.
|
|
2151
|
+
gr(value) {
|
|
2152
|
+
this.er_1.mm(value == null ? null : value.ar_1);
|
|
2099
2153
|
}
|
|
2100
|
-
|
|
2101
|
-
var tmp0_safe_receiver = this.
|
|
2154
|
+
hr() {
|
|
2155
|
+
var tmp0_safe_receiver = this.er_1.ek_1;
|
|
2102
2156
|
var tmp;
|
|
2103
2157
|
if (tmp0_safe_receiver == null) {
|
|
2104
2158
|
tmp = null;
|
|
@@ -2108,10 +2162,10 @@ class Game_0 {
|
|
|
2108
2162
|
}
|
|
2109
2163
|
return tmp;
|
|
2110
2164
|
}
|
|
2111
|
-
|
|
2165
|
+
ir() {
|
|
2112
2166
|
return this.id;
|
|
2113
2167
|
}
|
|
2114
|
-
|
|
2168
|
+
jr(value) {
|
|
2115
2169
|
var tmp;
|
|
2116
2170
|
if (value == null) {
|
|
2117
2171
|
tmp = null;
|
|
@@ -2119,76 +2173,76 @@ class Game_0 {
|
|
|
2119
2173
|
// Inline function 'kotlin.let' call
|
|
2120
2174
|
tmp = valueOf_2(value);
|
|
2121
2175
|
}
|
|
2122
|
-
this.
|
|
2176
|
+
this.er_1.nm(tmp);
|
|
2123
2177
|
}
|
|
2124
|
-
|
|
2125
|
-
var tmp0_safe_receiver = this.
|
|
2178
|
+
kr() {
|
|
2179
|
+
var tmp0_safe_receiver = this.er_1.fk_1;
|
|
2126
2180
|
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.toString();
|
|
2127
2181
|
}
|
|
2128
|
-
|
|
2129
|
-
this.
|
|
2182
|
+
km(value) {
|
|
2183
|
+
this.er_1.km(value);
|
|
2130
2184
|
}
|
|
2131
|
-
|
|
2132
|
-
return this.
|
|
2185
|
+
sm() {
|
|
2186
|
+
return this.er_1.bk_1;
|
|
2133
2187
|
}
|
|
2134
|
-
|
|
2135
|
-
this.
|
|
2188
|
+
om(value) {
|
|
2189
|
+
this.er_1.om(value);
|
|
2136
2190
|
}
|
|
2137
|
-
|
|
2138
|
-
return this.
|
|
2191
|
+
lr() {
|
|
2192
|
+
return this.er_1.jk_1;
|
|
2139
2193
|
}
|
|
2140
|
-
|
|
2141
|
-
return this.
|
|
2194
|
+
mr() {
|
|
2195
|
+
return this.er_1.hk_1.toString();
|
|
2142
2196
|
}
|
|
2143
|
-
|
|
2144
|
-
this.
|
|
2197
|
+
pm(value) {
|
|
2198
|
+
this.er_1.pm(value);
|
|
2145
2199
|
}
|
|
2146
|
-
|
|
2147
|
-
return this.
|
|
2200
|
+
nr() {
|
|
2201
|
+
return this.er_1.kk_1;
|
|
2148
2202
|
}
|
|
2149
|
-
|
|
2150
|
-
this.
|
|
2203
|
+
im(value) {
|
|
2204
|
+
this.er_1.im(value);
|
|
2151
2205
|
}
|
|
2152
|
-
|
|
2153
|
-
return this.
|
|
2206
|
+
pr() {
|
|
2207
|
+
return this.er_1.zj_1;
|
|
2154
2208
|
}
|
|
2155
|
-
|
|
2156
|
-
this.
|
|
2209
|
+
lm(value) {
|
|
2210
|
+
this.er_1.lm(value);
|
|
2157
2211
|
}
|
|
2158
|
-
|
|
2159
|
-
return this.
|
|
2212
|
+
qr() {
|
|
2213
|
+
return this.er_1.ck_1;
|
|
2160
2214
|
}
|
|
2161
|
-
|
|
2162
|
-
return this.
|
|
2215
|
+
rr() {
|
|
2216
|
+
return this.er_1.gk_1.toString();
|
|
2163
2217
|
}
|
|
2164
|
-
|
|
2165
|
-
this.
|
|
2218
|
+
jm(value) {
|
|
2219
|
+
this.er_1.jm(value);
|
|
2166
2220
|
}
|
|
2167
|
-
|
|
2168
|
-
return this.
|
|
2221
|
+
sr() {
|
|
2222
|
+
return this.er_1.ak_1;
|
|
2169
2223
|
}
|
|
2170
|
-
|
|
2224
|
+
tr() {
|
|
2171
2225
|
var p = {};
|
|
2172
2226
|
// Inline function 'kotlin.collections.forEach' call
|
|
2173
|
-
var _iterator__ex2g4s = this.
|
|
2227
|
+
var _iterator__ex2g4s = this.er_1.xj_1.k2().x();
|
|
2174
2228
|
while (_iterator__ex2g4s.z()) {
|
|
2175
2229
|
var element = _iterator__ex2g4s.a1();
|
|
2176
|
-
p
|
|
2230
|
+
p[element.g2()] = element.h2();
|
|
2177
2231
|
}
|
|
2178
2232
|
return p;
|
|
2179
2233
|
}
|
|
2180
2234
|
setTag(name, value) {
|
|
2181
2235
|
// Inline function 'kotlin.collections.set' call
|
|
2182
|
-
this.
|
|
2236
|
+
this.er_1.xj_1.f5(name, value);
|
|
2183
2237
|
}
|
|
2184
2238
|
getTag(name) {
|
|
2185
|
-
return this.
|
|
2239
|
+
return this.er_1.xj_1.j2(name);
|
|
2186
2240
|
}
|
|
2187
2241
|
toString() {
|
|
2188
|
-
return this.
|
|
2242
|
+
return this.er_1.toString();
|
|
2189
2243
|
}
|
|
2190
|
-
|
|
2191
|
-
return new Game_0(this.
|
|
2244
|
+
tm(idSupplier) {
|
|
2245
|
+
return new Game_0(this.er_1.tm(idSupplier));
|
|
2192
2246
|
}
|
|
2193
2247
|
toAnalysis(idSupplier, $super) {
|
|
2194
2248
|
var tmp;
|
|
@@ -2198,90 +2252,93 @@ class Game_0 {
|
|
|
2198
2252
|
tmp = idSupplier;
|
|
2199
2253
|
}
|
|
2200
2254
|
idSupplier = tmp;
|
|
2201
|
-
return $super === VOID ? this.
|
|
2255
|
+
return $super === VOID ? this.tm(idSupplier) : $super.tm.call(this, idSupplier);
|
|
2202
2256
|
}
|
|
2203
2257
|
deleteFromExclusive(node) {
|
|
2204
|
-
return new Node_0(deleteFromExclusive(this.
|
|
2258
|
+
return new Node_0(deleteFromExclusive(this.er_1, node.ur_1));
|
|
2205
2259
|
}
|
|
2206
2260
|
deleteFromInclusive(node) {
|
|
2207
|
-
return new Node_0(deleteFromInclusive(this.
|
|
2261
|
+
return new Node_0(deleteFromInclusive(this.er_1, node.ur_1));
|
|
2208
2262
|
}
|
|
2209
2263
|
deleteBefore(_this__u8e3s4, node) {
|
|
2210
|
-
return new Node_0(deleteBefore(_this__u8e3s4.
|
|
2264
|
+
return new Node_0(deleteBefore(_this__u8e3s4.er_1, node.ur_1));
|
|
2265
|
+
}
|
|
2266
|
+
updateEco() {
|
|
2267
|
+
this.er_1.tl();
|
|
2211
2268
|
}
|
|
2212
2269
|
get ecoInfo() {
|
|
2213
|
-
return this.
|
|
2270
|
+
return this.hr();
|
|
2214
2271
|
}
|
|
2215
2272
|
set ecoInfo(value) {
|
|
2216
|
-
this.
|
|
2273
|
+
this.gr(value);
|
|
2217
2274
|
}
|
|
2218
2275
|
get result() {
|
|
2219
|
-
return this.
|
|
2276
|
+
return this.kr();
|
|
2220
2277
|
}
|
|
2221
2278
|
set result(value) {
|
|
2222
|
-
this.
|
|
2279
|
+
this.jr(value);
|
|
2223
2280
|
}
|
|
2224
2281
|
get fiftyMoves() {
|
|
2225
|
-
return this.
|
|
2282
|
+
return this.sm();
|
|
2226
2283
|
}
|
|
2227
2284
|
set fiftyMoves(value) {
|
|
2228
|
-
this.
|
|
2285
|
+
this.km(value);
|
|
2229
2286
|
}
|
|
2230
2287
|
get finalComment() {
|
|
2231
|
-
return this.
|
|
2288
|
+
return this.lr();
|
|
2232
2289
|
}
|
|
2233
2290
|
set finalComment(value) {
|
|
2234
|
-
this.
|
|
2291
|
+
this.om(value);
|
|
2235
2292
|
}
|
|
2236
2293
|
get fiftyMovesRuleMode() {
|
|
2237
|
-
return this.
|
|
2294
|
+
return this.mr();
|
|
2238
2295
|
}
|
|
2239
2296
|
get finalEndLineComment() {
|
|
2240
|
-
return this.
|
|
2297
|
+
return this.nr();
|
|
2241
2298
|
}
|
|
2242
2299
|
set finalEndLineComment(value) {
|
|
2243
|
-
this.
|
|
2300
|
+
this.pm(value);
|
|
2244
2301
|
}
|
|
2245
2302
|
get fiveRepetitions() {
|
|
2246
|
-
return this.
|
|
2303
|
+
return this.pr();
|
|
2247
2304
|
}
|
|
2248
2305
|
set fiveRepetitions(value) {
|
|
2249
|
-
this.
|
|
2306
|
+
this.im(value);
|
|
2250
2307
|
}
|
|
2251
2308
|
get seventyFiveMoves() {
|
|
2252
|
-
return this.
|
|
2309
|
+
return this.qr();
|
|
2253
2310
|
}
|
|
2254
2311
|
set seventyFiveMoves(value) {
|
|
2255
|
-
this.
|
|
2312
|
+
this.lm(value);
|
|
2256
2313
|
}
|
|
2257
2314
|
get threeRepetitionsMode() {
|
|
2258
|
-
return this.
|
|
2315
|
+
return this.rr();
|
|
2259
2316
|
}
|
|
2260
2317
|
get threeRepetitionsWarning() {
|
|
2261
|
-
return this.
|
|
2318
|
+
return this.sr();
|
|
2262
2319
|
}
|
|
2263
2320
|
set threeRepetitionsWarning(value) {
|
|
2264
|
-
this.
|
|
2321
|
+
this.jm(value);
|
|
2265
2322
|
}
|
|
2266
2323
|
get tags() {
|
|
2267
|
-
return this.
|
|
2324
|
+
return this.tr();
|
|
2268
2325
|
}
|
|
2269
2326
|
}
|
|
2270
2327
|
class Move_0 {
|
|
2271
2328
|
constructor(backedMove) {
|
|
2272
2329
|
this.backedMove = backedMove;
|
|
2273
2330
|
}
|
|
2274
|
-
|
|
2331
|
+
vr() {
|
|
2275
2332
|
return this.backedMove;
|
|
2276
2333
|
}
|
|
2277
|
-
|
|
2278
|
-
return this.backedMove.
|
|
2334
|
+
wr() {
|
|
2335
|
+
return this.backedMove.qn_1;
|
|
2279
2336
|
}
|
|
2280
|
-
|
|
2281
|
-
return this.backedMove.
|
|
2337
|
+
xr() {
|
|
2338
|
+
return this.backedMove.sn_1;
|
|
2282
2339
|
}
|
|
2283
|
-
|
|
2284
|
-
return this.backedMove.
|
|
2340
|
+
yr() {
|
|
2341
|
+
return this.backedMove.rn_1;
|
|
2285
2342
|
}
|
|
2286
2343
|
hashCode() {
|
|
2287
2344
|
return this.backedMove.hashCode();
|
|
@@ -2299,27 +2356,27 @@ class Move_0 {
|
|
|
2299
2356
|
return this.backedMove.toString();
|
|
2300
2357
|
}
|
|
2301
2358
|
get origin() {
|
|
2302
|
-
return this.
|
|
2359
|
+
return this.wr();
|
|
2303
2360
|
}
|
|
2304
2361
|
get target() {
|
|
2305
|
-
return this.
|
|
2362
|
+
return this.xr();
|
|
2306
2363
|
}
|
|
2307
2364
|
get promotionPiece() {
|
|
2308
|
-
return this.
|
|
2365
|
+
return this.yr();
|
|
2309
2366
|
}
|
|
2310
2367
|
}
|
|
2311
2368
|
class Node_0 {
|
|
2312
2369
|
constructor(backedNode) {
|
|
2313
|
-
this.
|
|
2370
|
+
this.ur_1 = backedNode;
|
|
2314
2371
|
}
|
|
2315
|
-
|
|
2316
|
-
return this.
|
|
2372
|
+
zr() {
|
|
2373
|
+
return this.ur_1;
|
|
2317
2374
|
}
|
|
2318
2375
|
uj() {
|
|
2319
|
-
return new Position_0(this.
|
|
2376
|
+
return new Position_0(this.ur_1.uj());
|
|
2320
2377
|
}
|
|
2321
2378
|
rk() {
|
|
2322
|
-
var tmp0_safe_receiver = this.
|
|
2379
|
+
var tmp0_safe_receiver = this.ur_1.rk();
|
|
2323
2380
|
var tmp;
|
|
2324
2381
|
if (tmp0_safe_receiver == null) {
|
|
2325
2382
|
tmp = null;
|
|
@@ -2331,7 +2388,7 @@ class Node_0 {
|
|
|
2331
2388
|
}
|
|
2332
2389
|
bj() {
|
|
2333
2390
|
// Inline function 'kotlin.collections.map' call
|
|
2334
|
-
var this_0 = this.
|
|
2391
|
+
var this_0 = this.ur_1.bj();
|
|
2335
2392
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2336
2393
|
var destination = ArrayList.l5(collectionSizeOrDefault(this_0, 10));
|
|
2337
2394
|
var _iterator__ex2g4s = this_0.x();
|
|
@@ -2343,20 +2400,20 @@ class Node_0 {
|
|
|
2343
2400
|
return destination.e2();
|
|
2344
2401
|
}
|
|
2345
2402
|
sk() {
|
|
2346
|
-
return this.
|
|
2403
|
+
return this.ur_1.sk();
|
|
2347
2404
|
}
|
|
2348
2405
|
cj() {
|
|
2349
|
-
return this.
|
|
2406
|
+
return this.ur_1.cj();
|
|
2350
2407
|
}
|
|
2351
2408
|
dj() {
|
|
2352
|
-
return this.
|
|
2409
|
+
return this.ur_1.dj();
|
|
2353
2410
|
}
|
|
2354
2411
|
tk() {
|
|
2355
|
-
var tmp0_safe_receiver = this.
|
|
2412
|
+
var tmp0_safe_receiver = this.ur_1.tk();
|
|
2356
2413
|
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e2();
|
|
2357
2414
|
}
|
|
2358
2415
|
aj() {
|
|
2359
|
-
var tmp0_safe_receiver = this.
|
|
2416
|
+
var tmp0_safe_receiver = this.ur_1.aj();
|
|
2360
2417
|
var tmp;
|
|
2361
2418
|
if (tmp0_safe_receiver == null) {
|
|
2362
2419
|
tmp = null;
|
|
@@ -2366,7 +2423,7 @@ class Node_0 {
|
|
|
2366
2423
|
}
|
|
2367
2424
|
return tmp;
|
|
2368
2425
|
}
|
|
2369
|
-
|
|
2426
|
+
as(move, initialComment, comment, endLineComment, suffixAnnotations, notation) {
|
|
2370
2427
|
var tmp;
|
|
2371
2428
|
if (suffixAnnotations == null) {
|
|
2372
2429
|
tmp = null;
|
|
@@ -2374,7 +2431,7 @@ class Node_0 {
|
|
|
2374
2431
|
// Inline function 'kotlin.js.collections.toList' call
|
|
2375
2432
|
tmp = createListFrom(suffixAnnotations);
|
|
2376
2433
|
}
|
|
2377
|
-
return new Node_0(this.
|
|
2434
|
+
return new Node_0(this.ur_1.vk(move, initialComment, comment, endLineComment, tmp, valueOf_3(notation.name)));
|
|
2378
2435
|
}
|
|
2379
2436
|
appendMove(move, initialComment, comment, endLineComment, suffixAnnotations, notation, $super) {
|
|
2380
2437
|
initialComment = initialComment === VOID ? null : initialComment;
|
|
@@ -2382,40 +2439,48 @@ class Node_0 {
|
|
|
2382
2439
|
endLineComment = endLineComment === VOID ? null : endLineComment;
|
|
2383
2440
|
suffixAnnotations = suffixAnnotations === VOID ? null : suffixAnnotations;
|
|
2384
2441
|
notation = notation === VOID ? get_SAN() : notation;
|
|
2385
|
-
return $super === VOID ? this.
|
|
2442
|
+
return $super === VOID ? this.as(move, initialComment, comment, endLineComment, suffixAnnotations, notation) : $super.as.call(this, move, initialComment, comment, endLineComment, suffixAnnotations, notation);
|
|
2386
2443
|
}
|
|
2387
2444
|
promoteChild(index) {
|
|
2388
|
-
return this.
|
|
2445
|
+
return this.ur_1.xk(index);
|
|
2389
2446
|
}
|
|
2390
2447
|
promoteNode() {
|
|
2391
|
-
return this.
|
|
2448
|
+
return this.ur_1.yk();
|
|
2392
2449
|
}
|
|
2393
2450
|
removeChild(node) {
|
|
2394
|
-
return this.
|
|
2451
|
+
return this.ur_1.zk(node.ur_1);
|
|
2395
2452
|
}
|
|
2396
2453
|
hasChildren() {
|
|
2397
|
-
return this.
|
|
2454
|
+
return this.ur_1.al();
|
|
2398
2455
|
}
|
|
2399
2456
|
belongsToMainLine() {
|
|
2400
|
-
return this.
|
|
2457
|
+
return this.ur_1.bl();
|
|
2401
2458
|
}
|
|
2402
2459
|
copy(parent) {
|
|
2403
|
-
return new Node_0(this.
|
|
2460
|
+
return new Node_0(this.ur_1.cl(parent == null ? null : parent.ur_1));
|
|
2404
2461
|
}
|
|
2405
2462
|
hashCode() {
|
|
2406
|
-
return hashCode(this.
|
|
2463
|
+
return hashCode(this.ur_1);
|
|
2407
2464
|
}
|
|
2408
2465
|
equals(other) {
|
|
2409
2466
|
var tmp;
|
|
2410
2467
|
if (other instanceof Node_0) {
|
|
2411
|
-
tmp = equals(this.
|
|
2468
|
+
tmp = equals(this.ur_1, other.ur_1);
|
|
2412
2469
|
} else {
|
|
2413
2470
|
tmp = false;
|
|
2414
2471
|
}
|
|
2415
2472
|
return tmp;
|
|
2416
2473
|
}
|
|
2417
2474
|
toString() {
|
|
2418
|
-
return toString(this.
|
|
2475
|
+
return toString(this.ur_1);
|
|
2476
|
+
}
|
|
2477
|
+
dl(language, pieces) {
|
|
2478
|
+
return this.ur_1.dl(language, pieces);
|
|
2479
|
+
}
|
|
2480
|
+
toSan(language, pieces, $super) {
|
|
2481
|
+
language = language === VOID ? 'english' : language;
|
|
2482
|
+
pieces = pieces === VOID ? null : pieces;
|
|
2483
|
+
return $super === VOID ? this.dl(language, pieces) : $super.dl.call(this, language, pieces);
|
|
2419
2484
|
}
|
|
2420
2485
|
get position() {
|
|
2421
2486
|
return this.uj();
|
|
@@ -2470,13 +2535,13 @@ class Companion_8 {
|
|
|
2470
2535
|
var pair = to(element.l2_1, new Notation_0(element.l2_1));
|
|
2471
2536
|
destination_0.f5(pair.md_1, pair.nd_1);
|
|
2472
2537
|
}
|
|
2473
|
-
tmp_0.
|
|
2538
|
+
tmp_0.bs_1 = destination_0;
|
|
2474
2539
|
}
|
|
2475
2540
|
k2() {
|
|
2476
2541
|
return this.entries;
|
|
2477
2542
|
}
|
|
2478
2543
|
get(name) {
|
|
2479
|
-
return this.
|
|
2544
|
+
return this.bs_1.j2(name);
|
|
2480
2545
|
}
|
|
2481
2546
|
}
|
|
2482
2547
|
class Notation_0 {
|
|
@@ -2484,7 +2549,7 @@ class Notation_0 {
|
|
|
2484
2549
|
Companion_getInstance_8();
|
|
2485
2550
|
this.name = name;
|
|
2486
2551
|
}
|
|
2487
|
-
|
|
2552
|
+
cr() {
|
|
2488
2553
|
return this.name;
|
|
2489
2554
|
}
|
|
2490
2555
|
}
|
|
@@ -2514,7 +2579,7 @@ class Companion_9 {
|
|
|
2514
2579
|
var tmp$ret$3 = new Piece_0(item_0.m2_1, item_0.l2_1);
|
|
2515
2580
|
destination_0.k(tmp$ret$3);
|
|
2516
2581
|
}
|
|
2517
|
-
tmp_0.
|
|
2582
|
+
tmp_0.cs_1 = destination_0;
|
|
2518
2583
|
var tmp_1 = this;
|
|
2519
2584
|
// Inline function 'kotlin.collections.associate' call
|
|
2520
2585
|
var this_2 = get_entries_2();
|
|
@@ -2528,19 +2593,19 @@ class Companion_9 {
|
|
|
2528
2593
|
var pair = to(element.l2_1, new Piece_0(element.m2_1, element.l2_1));
|
|
2529
2594
|
destination_1.f5(pair.md_1, pair.nd_1);
|
|
2530
2595
|
}
|
|
2531
|
-
tmp_1.
|
|
2596
|
+
tmp_1.ds_1 = destination_1;
|
|
2532
2597
|
}
|
|
2533
2598
|
k2() {
|
|
2534
2599
|
return this.entries;
|
|
2535
2600
|
}
|
|
2536
|
-
|
|
2537
|
-
return this.
|
|
2601
|
+
es() {
|
|
2602
|
+
return this.cs_1;
|
|
2538
2603
|
}
|
|
2539
2604
|
get(name) {
|
|
2540
|
-
return this.
|
|
2605
|
+
return this.ds_1.j2(name);
|
|
2541
2606
|
}
|
|
2542
2607
|
indexToPiece(index) {
|
|
2543
|
-
return this.
|
|
2608
|
+
return this.cs_1.c1(index);
|
|
2544
2609
|
}
|
|
2545
2610
|
}
|
|
2546
2611
|
class Piece_0 {
|
|
@@ -2549,19 +2614,19 @@ class Piece_0 {
|
|
|
2549
2614
|
this.ordinal = ordinal;
|
|
2550
2615
|
this.name = name;
|
|
2551
2616
|
}
|
|
2552
|
-
|
|
2617
|
+
fs() {
|
|
2553
2618
|
return this.ordinal;
|
|
2554
2619
|
}
|
|
2555
|
-
|
|
2620
|
+
cr() {
|
|
2556
2621
|
return this.name;
|
|
2557
2622
|
}
|
|
2558
2623
|
}
|
|
2559
2624
|
class Position_0 {
|
|
2560
2625
|
constructor(backedPosition) {
|
|
2561
|
-
this.
|
|
2626
|
+
this.gs_1 = backedPosition;
|
|
2562
2627
|
var tmp = this;
|
|
2563
2628
|
// Inline function 'kotlin.collections.map' call
|
|
2564
|
-
var this_0 = this.
|
|
2629
|
+
var this_0 = this.gs_1.fq();
|
|
2565
2630
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2566
2631
|
var destination = ArrayList.l5(this_0.length);
|
|
2567
2632
|
var inductionVariable = 0;
|
|
@@ -2573,69 +2638,69 @@ class Position_0 {
|
|
|
2573
2638
|
destination.k(tmp$ret$0);
|
|
2574
2639
|
}
|
|
2575
2640
|
tmp.bitboards = destination.e2();
|
|
2576
|
-
this.whiteMove = this.
|
|
2577
|
-
this.enPassant = this.
|
|
2578
|
-
this.whiteCastleKingside = this.
|
|
2579
|
-
this.whiteCastleQueenside = this.
|
|
2580
|
-
this.blackCastleKingside = this.
|
|
2581
|
-
this.blackCastleQueenside = this.
|
|
2582
|
-
this.movesCounter = this.
|
|
2583
|
-
this.halfMovesCounter = this.
|
|
2641
|
+
this.whiteMove = this.gs_1.fj_1;
|
|
2642
|
+
this.enPassant = this.gs_1.gj_1;
|
|
2643
|
+
this.whiteCastleKingside = this.gs_1.hj_1;
|
|
2644
|
+
this.whiteCastleQueenside = this.gs_1.ij_1;
|
|
2645
|
+
this.blackCastleKingside = this.gs_1.jj_1;
|
|
2646
|
+
this.blackCastleQueenside = this.gs_1.kj_1;
|
|
2647
|
+
this.movesCounter = this.gs_1.lj_1;
|
|
2648
|
+
this.halfMovesCounter = this.gs_1.mj_1;
|
|
2584
2649
|
}
|
|
2585
|
-
|
|
2650
|
+
fq() {
|
|
2586
2651
|
return this.bitboards;
|
|
2587
2652
|
}
|
|
2588
|
-
|
|
2653
|
+
hs() {
|
|
2589
2654
|
return this.whiteMove;
|
|
2590
2655
|
}
|
|
2591
|
-
|
|
2656
|
+
is() {
|
|
2592
2657
|
return this.enPassant;
|
|
2593
2658
|
}
|
|
2594
|
-
|
|
2659
|
+
js() {
|
|
2595
2660
|
return this.whiteCastleKingside;
|
|
2596
2661
|
}
|
|
2597
|
-
|
|
2662
|
+
ks() {
|
|
2598
2663
|
return this.whiteCastleQueenside;
|
|
2599
2664
|
}
|
|
2600
|
-
|
|
2665
|
+
ls() {
|
|
2601
2666
|
return this.blackCastleKingside;
|
|
2602
2667
|
}
|
|
2603
|
-
|
|
2668
|
+
ms() {
|
|
2604
2669
|
return this.blackCastleQueenside;
|
|
2605
2670
|
}
|
|
2606
|
-
|
|
2671
|
+
ns() {
|
|
2607
2672
|
return this.movesCounter;
|
|
2608
2673
|
}
|
|
2609
|
-
|
|
2674
|
+
os() {
|
|
2610
2675
|
return this.halfMovesCounter;
|
|
2611
2676
|
}
|
|
2612
|
-
fq() {
|
|
2613
|
-
return this.cs_1.fq();
|
|
2614
|
-
}
|
|
2615
2677
|
gq() {
|
|
2616
|
-
return this.
|
|
2678
|
+
return this.gs_1.gq();
|
|
2617
2679
|
}
|
|
2618
2680
|
hq() {
|
|
2619
|
-
return this.
|
|
2681
|
+
return this.gs_1.hq();
|
|
2620
2682
|
}
|
|
2621
2683
|
iq() {
|
|
2622
|
-
return this.
|
|
2623
|
-
}
|
|
2624
|
-
rm() {
|
|
2625
|
-
return this.cs_1.rm();
|
|
2684
|
+
return this.gs_1.iq();
|
|
2626
2685
|
}
|
|
2627
2686
|
jq() {
|
|
2628
|
-
return
|
|
2687
|
+
return this.gs_1.jq();
|
|
2688
|
+
}
|
|
2689
|
+
sm() {
|
|
2690
|
+
return this.gs_1.sm();
|
|
2629
2691
|
}
|
|
2630
2692
|
kq() {
|
|
2631
|
-
return this.
|
|
2693
|
+
return new Bitboard(this.gs_1.kq());
|
|
2632
2694
|
}
|
|
2633
2695
|
lq() {
|
|
2634
|
-
return this.
|
|
2696
|
+
return this.gs_1.lq();
|
|
2697
|
+
}
|
|
2698
|
+
mq() {
|
|
2699
|
+
return this.gs_1.mq();
|
|
2635
2700
|
}
|
|
2636
2701
|
bj() {
|
|
2637
2702
|
// Inline function 'kotlin.collections.map' call
|
|
2638
|
-
var this_0 = get_children(this.
|
|
2703
|
+
var this_0 = get_children(this.gs_1);
|
|
2639
2704
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2640
2705
|
var destination = ArrayList.l5(collectionSizeOrDefault(this_0, 10));
|
|
2641
2706
|
var _iterator__ex2g4s = this_0.x();
|
|
@@ -2647,11 +2712,11 @@ class Position_0 {
|
|
|
2647
2712
|
}
|
|
2648
2713
|
return destination.e2();
|
|
2649
2714
|
}
|
|
2650
|
-
|
|
2651
|
-
return get_draw(this.
|
|
2715
|
+
ps() {
|
|
2716
|
+
return get_draw(this.gs_1);
|
|
2652
2717
|
}
|
|
2653
|
-
|
|
2654
|
-
var tmp0_safe_receiver = get_enPassantSquare(this.
|
|
2718
|
+
qs() {
|
|
2719
|
+
var tmp0_safe_receiver = get_enPassantSquare(this.gs_1);
|
|
2655
2720
|
var tmp;
|
|
2656
2721
|
if (tmp0_safe_receiver == null) {
|
|
2657
2722
|
tmp = null;
|
|
@@ -2661,87 +2726,87 @@ class Position_0 {
|
|
|
2661
2726
|
}
|
|
2662
2727
|
return tmp;
|
|
2663
2728
|
}
|
|
2664
|
-
|
|
2665
|
-
return get_gameOver(this.
|
|
2729
|
+
rs() {
|
|
2730
|
+
return get_gameOver(this.gs_1);
|
|
2666
2731
|
}
|
|
2667
|
-
|
|
2668
|
-
return ensureNotNull(Companion_getInstance_10().get(get_sideToMove(this.
|
|
2732
|
+
ss() {
|
|
2733
|
+
return ensureNotNull(Companion_getInstance_10().get(get_sideToMove(this.gs_1).l2_1));
|
|
2669
2734
|
}
|
|
2670
2735
|
whiteLacksOfMaterial() {
|
|
2671
|
-
return whiteLacksOfMaterial(this.
|
|
2736
|
+
return whiteLacksOfMaterial(this.gs_1);
|
|
2672
2737
|
}
|
|
2673
2738
|
blackLacksOfMaterial() {
|
|
2674
|
-
return blackLacksOfMaterial(this.
|
|
2739
|
+
return blackLacksOfMaterial(this.gs_1);
|
|
2675
2740
|
}
|
|
2676
2741
|
pieceAt(square) {
|
|
2677
|
-
return Companion_getInstance_9().
|
|
2742
|
+
return Companion_getInstance_9().cs_1.c1(this.squares[square.ordinal]);
|
|
2678
2743
|
}
|
|
2679
2744
|
isLegal(move) {
|
|
2680
|
-
return isLegal(this.
|
|
2745
|
+
return isLegal(this.gs_1, move.backedMove);
|
|
2681
2746
|
}
|
|
2682
2747
|
move(move_0) {
|
|
2683
|
-
return new Position_0(move(this.
|
|
2748
|
+
return new Position_0(move(this.gs_1, move_0.backedMove));
|
|
2684
2749
|
}
|
|
2685
|
-
|
|
2686
|
-
return new Position_0(move_0(this.
|
|
2750
|
+
ts(move, notation) {
|
|
2751
|
+
return new Position_0(move_0(this.gs_1, move, valueOf_3(notation.name)));
|
|
2687
2752
|
}
|
|
2688
2753
|
moveFromString(move, notation, $super) {
|
|
2689
2754
|
notation = notation === VOID ? get_UCI() : notation;
|
|
2690
|
-
return $super === VOID ? this.
|
|
2755
|
+
return $super === VOID ? this.ts(move, notation) : $super.ts.call(this, move, notation);
|
|
2691
2756
|
}
|
|
2692
2757
|
hashCode() {
|
|
2693
|
-
return this.
|
|
2758
|
+
return this.gs_1.hashCode();
|
|
2694
2759
|
}
|
|
2695
2760
|
equals(other) {
|
|
2696
2761
|
var tmp;
|
|
2697
2762
|
if (other instanceof Position_0) {
|
|
2698
|
-
tmp = this.
|
|
2763
|
+
tmp = this.gs_1.equals(other.gs_1);
|
|
2699
2764
|
} else {
|
|
2700
2765
|
tmp = false;
|
|
2701
2766
|
}
|
|
2702
2767
|
return tmp;
|
|
2703
2768
|
}
|
|
2704
2769
|
toString() {
|
|
2705
|
-
return this.
|
|
2770
|
+
return this.gs_1.toString();
|
|
2706
2771
|
}
|
|
2707
2772
|
get check() {
|
|
2708
|
-
return this.
|
|
2773
|
+
return this.gq();
|
|
2709
2774
|
}
|
|
2710
2775
|
get checkmate() {
|
|
2711
|
-
return this.
|
|
2776
|
+
return this.hq();
|
|
2712
2777
|
}
|
|
2713
2778
|
get stalemate() {
|
|
2714
|
-
return this.
|
|
2779
|
+
return this.iq();
|
|
2715
2780
|
}
|
|
2716
2781
|
get lackOfMaterial() {
|
|
2717
|
-
return this.
|
|
2782
|
+
return this.jq();
|
|
2718
2783
|
}
|
|
2719
2784
|
get fiftyMoves() {
|
|
2720
|
-
return this.
|
|
2785
|
+
return this.sm();
|
|
2721
2786
|
}
|
|
2722
2787
|
get zobrist() {
|
|
2723
|
-
return this.
|
|
2788
|
+
return this.kq();
|
|
2724
2789
|
}
|
|
2725
2790
|
get squares() {
|
|
2726
|
-
return this.
|
|
2791
|
+
return this.lq();
|
|
2727
2792
|
}
|
|
2728
2793
|
get fen() {
|
|
2729
|
-
return this.
|
|
2794
|
+
return this.mq();
|
|
2730
2795
|
}
|
|
2731
2796
|
get children() {
|
|
2732
2797
|
return this.bj();
|
|
2733
2798
|
}
|
|
2734
2799
|
get draw() {
|
|
2735
|
-
return this.
|
|
2800
|
+
return this.ps();
|
|
2736
2801
|
}
|
|
2737
2802
|
get enPassantSquare() {
|
|
2738
|
-
return this.
|
|
2803
|
+
return this.qs();
|
|
2739
2804
|
}
|
|
2740
2805
|
get gameOver() {
|
|
2741
|
-
return this.
|
|
2806
|
+
return this.rs();
|
|
2742
2807
|
}
|
|
2743
2808
|
get sideToMove() {
|
|
2744
|
-
return this.
|
|
2809
|
+
return this.ss();
|
|
2745
2810
|
}
|
|
2746
2811
|
}
|
|
2747
2812
|
class Companion_10 {
|
|
@@ -2758,7 +2823,7 @@ class Companion_10 {
|
|
|
2758
2823
|
var tmp$ret$0 = new Side_0(item.l2_1);
|
|
2759
2824
|
destination.k(tmp$ret$0);
|
|
2760
2825
|
}
|
|
2761
|
-
tmp.
|
|
2826
|
+
tmp.us_1 = destination;
|
|
2762
2827
|
var tmp_0 = this;
|
|
2763
2828
|
// Inline function 'kotlin.collections.map' call
|
|
2764
2829
|
var this_1 = get_entries_1();
|
|
@@ -2784,16 +2849,16 @@ class Companion_10 {
|
|
|
2784
2849
|
var pair = to(element.l2_1, new Side_0(element.l2_1));
|
|
2785
2850
|
destination_1.f5(pair.md_1, pair.nd_1);
|
|
2786
2851
|
}
|
|
2787
|
-
tmp_1.
|
|
2852
|
+
tmp_1.vs_1 = destination_1;
|
|
2788
2853
|
}
|
|
2789
|
-
|
|
2790
|
-
return this.
|
|
2854
|
+
es() {
|
|
2855
|
+
return this.us_1;
|
|
2791
2856
|
}
|
|
2792
2857
|
k2() {
|
|
2793
2858
|
return this.entries;
|
|
2794
2859
|
}
|
|
2795
2860
|
get(name) {
|
|
2796
|
-
return this.
|
|
2861
|
+
return this.vs_1.j2(name);
|
|
2797
2862
|
}
|
|
2798
2863
|
}
|
|
2799
2864
|
class Side_0 {
|
|
@@ -2801,7 +2866,7 @@ class Side_0 {
|
|
|
2801
2866
|
Companion_getInstance_10();
|
|
2802
2867
|
this.name = name;
|
|
2803
2868
|
}
|
|
2804
|
-
|
|
2869
|
+
cr() {
|
|
2805
2870
|
return this.name;
|
|
2806
2871
|
}
|
|
2807
2872
|
}
|
|
@@ -2831,7 +2896,7 @@ class Companion_11 {
|
|
|
2831
2896
|
var tmp$ret$3 = new Square_0(item_0.m2_1, item_0.l2_1);
|
|
2832
2897
|
destination_0.k(tmp$ret$3);
|
|
2833
2898
|
}
|
|
2834
|
-
tmp_0.
|
|
2899
|
+
tmp_0.ws_1 = destination_0;
|
|
2835
2900
|
var tmp_1 = this;
|
|
2836
2901
|
// Inline function 'kotlin.collections.associate' call
|
|
2837
2902
|
var this_2 = get_entries_2();
|
|
@@ -2845,19 +2910,19 @@ class Companion_11 {
|
|
|
2845
2910
|
var pair = to(element.l2_1, new Square_0(element.m2_1, element.l2_1));
|
|
2846
2911
|
destination_1.f5(pair.md_1, pair.nd_1);
|
|
2847
2912
|
}
|
|
2848
|
-
tmp_1.
|
|
2913
|
+
tmp_1.xs_1 = destination_1;
|
|
2849
2914
|
}
|
|
2850
2915
|
k2() {
|
|
2851
2916
|
return this.entries;
|
|
2852
2917
|
}
|
|
2853
|
-
|
|
2854
|
-
return this.
|
|
2918
|
+
es() {
|
|
2919
|
+
return this.ws_1;
|
|
2855
2920
|
}
|
|
2856
2921
|
get(name) {
|
|
2857
|
-
return this.
|
|
2922
|
+
return this.xs_1.j2(name);
|
|
2858
2923
|
}
|
|
2859
2924
|
indexToSquare(index) {
|
|
2860
|
-
return this.
|
|
2925
|
+
return this.ws_1.c1(index);
|
|
2861
2926
|
}
|
|
2862
2927
|
}
|
|
2863
2928
|
class Square_0 {
|
|
@@ -2866,10 +2931,10 @@ class Square_0 {
|
|
|
2866
2931
|
this.ordinal = ordinal;
|
|
2867
2932
|
this.name = name;
|
|
2868
2933
|
}
|
|
2869
|
-
|
|
2934
|
+
fs() {
|
|
2870
2935
|
return this.ordinal;
|
|
2871
2936
|
}
|
|
2872
|
-
|
|
2937
|
+
cr() {
|
|
2873
2938
|
return this.name;
|
|
2874
2939
|
}
|
|
2875
2940
|
getCol() {
|
|
@@ -3090,7 +3155,7 @@ function toString_3($this, tabulation) {
|
|
|
3090
3155
|
sb.za(p.uj().lj_1).j8('...');
|
|
3091
3156
|
}
|
|
3092
3157
|
}
|
|
3093
|
-
sb.j8(
|
|
3158
|
+
sb.j8(toSan_0(p.uj(), $this.oi_1)).j8(' ');
|
|
3094
3159
|
var tmp6_safe_receiver = $this.si_1;
|
|
3095
3160
|
if (tmp6_safe_receiver == null)
|
|
3096
3161
|
null;
|
|
@@ -3388,35 +3453,35 @@ function Result_DRAW_getInstance() {
|
|
|
3388
3453
|
return Result_DRAW_instance;
|
|
3389
3454
|
}
|
|
3390
3455
|
function *_generator_invoke__zhh2q8($this, $this$sequence, $completion) {
|
|
3391
|
-
var tmp = $this$sequence.wd($this.
|
|
3456
|
+
var tmp = $this$sequence.wd($this.um_1.fn(), $completion);
|
|
3392
3457
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
3393
3458
|
tmp = yield tmp;
|
|
3394
|
-
var tmp_0 = $this$sequence.wd($this.
|
|
3459
|
+
var tmp_0 = $this$sequence.wd($this.um_1.gn(), $completion);
|
|
3395
3460
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
3396
3461
|
tmp_0 = yield tmp_0;
|
|
3397
3462
|
return Unit_instance;
|
|
3398
3463
|
}
|
|
3399
3464
|
function KingMoves$regularMovesList$delegate$lambda$lambda(this$0) {
|
|
3400
|
-
return (it) => this$0.
|
|
3465
|
+
return (it) => this$0.an_1(this$0.wm_1, countTrailingZeroBits(it));
|
|
3401
3466
|
}
|
|
3402
3467
|
function KingMoves$regularMovesList$delegate$lambda(this$0) {
|
|
3403
|
-
return () => bitboardToList(this$0.
|
|
3468
|
+
return () => bitboardToList(this$0.ym_1, KingMoves$regularMovesList$delegate$lambda$lambda(this$0));
|
|
3404
3469
|
}
|
|
3405
3470
|
function KingMoves$_get_regularMovesList_$ref_1r6ljl() {
|
|
3406
|
-
return (p0) => p0.
|
|
3471
|
+
return (p0) => p0.fn();
|
|
3407
3472
|
}
|
|
3408
3473
|
function KingMoves$castleMovesList$delegate$lambda$lambda(this$0) {
|
|
3409
|
-
return (it) => this$0.
|
|
3474
|
+
return (it) => this$0.an_1(this$0.wm_1, countTrailingZeroBits(it));
|
|
3410
3475
|
}
|
|
3411
3476
|
function KingMoves$castleMovesList$delegate$lambda(this$0) {
|
|
3412
|
-
return () => bitboardToList(this$0.
|
|
3477
|
+
return () => bitboardToList(this$0.zm_1, KingMoves$castleMovesList$delegate$lambda$lambda(this$0));
|
|
3413
3478
|
}
|
|
3414
3479
|
function KingMoves$_get_castleMovesList_$ref_3suu4f() {
|
|
3415
|
-
return (p0) => p0.
|
|
3480
|
+
return (p0) => p0.gn();
|
|
3416
3481
|
}
|
|
3417
3482
|
function KingMoves$allMovesList$delegate$lambda$slambda_0(this$0) {
|
|
3418
3483
|
var i = new KingMoves$allMovesList$delegate$lambda$slambda(this$0);
|
|
3419
|
-
var l = ($this$sequence, $completion) => i.
|
|
3484
|
+
var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
|
|
3420
3485
|
l.$arity = 1;
|
|
3421
3486
|
return l;
|
|
3422
3487
|
}
|
|
@@ -3424,7 +3489,7 @@ function KingMoves$allMovesList$delegate$lambda(this$0) {
|
|
|
3424
3489
|
return () => toList(sequence(KingMoves$allMovesList$delegate$lambda$slambda_0(this$0)));
|
|
3425
3490
|
}
|
|
3426
3491
|
function KingMoves$_get_allMovesList_$ref_go3t84() {
|
|
3427
|
-
return (p0) => p0.
|
|
3492
|
+
return (p0) => p0.in();
|
|
3428
3493
|
}
|
|
3429
3494
|
var Level_TRACE_instance;
|
|
3430
3495
|
var Level_DEBUG_instance;
|
|
@@ -3504,67 +3569,67 @@ function init_io_github_lunalobos_chess4kt_Move(_this__u8e3s4) {
|
|
|
3504
3569
|
Companion_getInstance_2();
|
|
3505
3570
|
}
|
|
3506
3571
|
function init_io_github_lunalobos_chess4kt_MoveException(_this__u8e3s4) {
|
|
3507
|
-
captureStack(_this__u8e3s4, _this__u8e3s4.
|
|
3572
|
+
captureStack(_this__u8e3s4, _this__u8e3s4.zn_1);
|
|
3508
3573
|
}
|
|
3509
3574
|
function *_generator_invoke__zhh2q8_0($this, $this$sequence, $completion) {
|
|
3510
|
-
var tmp = asSequence($this.
|
|
3575
|
+
var tmp = asSequence($this.jo_1.bo_1);
|
|
3511
3576
|
var tmp_0 = $this$sequence.xd(flatMap(tmp, MovesInfo$movesList$delegate$lambda$slambda$lambda), $completion);
|
|
3512
3577
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
3513
3578
|
tmp_0 = yield tmp_0;
|
|
3514
|
-
var tmp_1 = asSequence($this.
|
|
3579
|
+
var tmp_1 = asSequence($this.jo_1.co_1);
|
|
3515
3580
|
var tmp_2 = $this$sequence.xd(flatMap(tmp_1, MovesInfo$movesList$delegate$lambda$slambda$lambda_0), $completion);
|
|
3516
3581
|
if (tmp_2 === get_COROUTINE_SUSPENDED())
|
|
3517
3582
|
tmp_2 = yield tmp_2;
|
|
3518
|
-
var tmp_3 = asSequence($this.
|
|
3583
|
+
var tmp_3 = asSequence($this.jo_1.do_1);
|
|
3519
3584
|
var tmp_4 = $this$sequence.xd(flatMap(tmp_3, MovesInfo$movesList$delegate$lambda$slambda$lambda_1), $completion);
|
|
3520
3585
|
if (tmp_4 === get_COROUTINE_SUSPENDED())
|
|
3521
3586
|
tmp_4 = yield tmp_4;
|
|
3522
|
-
var tmp_5 = asSequence($this.
|
|
3587
|
+
var tmp_5 = asSequence($this.jo_1.eo_1);
|
|
3523
3588
|
var tmp_6 = $this$sequence.xd(flatMap(tmp_5, MovesInfo$movesList$delegate$lambda$slambda$lambda_2), $completion);
|
|
3524
3589
|
if (tmp_6 === get_COROUTINE_SUSPENDED())
|
|
3525
3590
|
tmp_6 = yield tmp_6;
|
|
3526
|
-
var tmp_7 = asSequence($this.
|
|
3591
|
+
var tmp_7 = asSequence($this.jo_1.fo_1);
|
|
3527
3592
|
var tmp_8 = $this$sequence.xd(flatMap(tmp_7, MovesInfo$movesList$delegate$lambda$slambda$lambda_3), $completion);
|
|
3528
3593
|
if (tmp_8 === get_COROUTINE_SUSPENDED())
|
|
3529
3594
|
tmp_8 = yield tmp_8;
|
|
3530
|
-
var tmp_9 = $this$sequence.xd(asSequence($this.
|
|
3595
|
+
var tmp_9 = $this$sequence.xd(asSequence($this.jo_1.go_1.in()), $completion);
|
|
3531
3596
|
if (tmp_9 === get_COROUTINE_SUSPENDED())
|
|
3532
3597
|
tmp_9 = yield tmp_9;
|
|
3533
3598
|
return Unit_instance;
|
|
3534
3599
|
}
|
|
3535
3600
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda(it) {
|
|
3536
|
-
return asSequence(it.
|
|
3601
|
+
return asSequence(it.in());
|
|
3537
3602
|
}
|
|
3538
3603
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_0(it) {
|
|
3539
|
-
return asSequence(it.
|
|
3604
|
+
return asSequence(it.in());
|
|
3540
3605
|
}
|
|
3541
3606
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_1(it) {
|
|
3542
|
-
return asSequence(it.
|
|
3607
|
+
return asSequence(it.in());
|
|
3543
3608
|
}
|
|
3544
3609
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_2(it) {
|
|
3545
|
-
return asSequence(it.
|
|
3610
|
+
return asSequence(it.in());
|
|
3546
3611
|
}
|
|
3547
3612
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_3(it) {
|
|
3548
|
-
return asSequence(it.
|
|
3613
|
+
return asSequence(it.in());
|
|
3549
3614
|
}
|
|
3550
3615
|
function MovesInfo$moves$delegate$lambda$lambda(it) {
|
|
3551
|
-
return it.
|
|
3616
|
+
return it.xo_1;
|
|
3552
3617
|
}
|
|
3553
3618
|
function MovesInfo$moves$delegate$lambda$lambda_0(it) {
|
|
3554
|
-
return it.
|
|
3619
|
+
return it.cp_1;
|
|
3555
3620
|
}
|
|
3556
3621
|
function MovesInfo$moves$delegate$lambda$lambda_1(it) {
|
|
3557
|
-
return it.
|
|
3622
|
+
return it.cp_1;
|
|
3558
3623
|
}
|
|
3559
3624
|
function MovesInfo$moves$delegate$lambda$lambda_2(it) {
|
|
3560
|
-
return it.
|
|
3625
|
+
return it.cp_1;
|
|
3561
3626
|
}
|
|
3562
3627
|
function MovesInfo$moves$delegate$lambda$lambda_3(it) {
|
|
3563
|
-
return it.
|
|
3628
|
+
return it.cp_1;
|
|
3564
3629
|
}
|
|
3565
3630
|
function MovesInfo$moves$delegate$lambda(this$0) {
|
|
3566
3631
|
return () => {
|
|
3567
|
-
var tmp = asSequence(this$0.
|
|
3632
|
+
var tmp = asSequence(this$0.bo_1);
|
|
3568
3633
|
// Inline function 'kotlin.sequences.fold' call
|
|
3569
3634
|
var accumulator = 0n;
|
|
3570
3635
|
var _iterator__ex2g4s = map(tmp, MovesInfo$moves$delegate$lambda$lambda).x();
|
|
@@ -3573,7 +3638,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3573
3638
|
accumulator = accumulator | element;
|
|
3574
3639
|
}
|
|
3575
3640
|
var pm = accumulator;
|
|
3576
|
-
var tmp_0 = asSequence(this$0.
|
|
3641
|
+
var tmp_0 = asSequence(this$0.co_1);
|
|
3577
3642
|
// Inline function 'kotlin.sequences.fold' call
|
|
3578
3643
|
var accumulator_0 = 0n;
|
|
3579
3644
|
var _iterator__ex2g4s_0 = map(tmp_0, MovesInfo$moves$delegate$lambda$lambda_0).x();
|
|
@@ -3582,7 +3647,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3582
3647
|
accumulator_0 = accumulator_0 | element_0;
|
|
3583
3648
|
}
|
|
3584
3649
|
var nm = accumulator_0;
|
|
3585
|
-
var tmp_1 = asSequence(this$0.
|
|
3650
|
+
var tmp_1 = asSequence(this$0.do_1);
|
|
3586
3651
|
// Inline function 'kotlin.sequences.fold' call
|
|
3587
3652
|
var accumulator_1 = 0n;
|
|
3588
3653
|
var _iterator__ex2g4s_1 = map(tmp_1, MovesInfo$moves$delegate$lambda$lambda_1).x();
|
|
@@ -3591,7 +3656,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3591
3656
|
accumulator_1 = accumulator_1 | element_1;
|
|
3592
3657
|
}
|
|
3593
3658
|
var bm = accumulator_1;
|
|
3594
|
-
var tmp_2 = asSequence(this$0.
|
|
3659
|
+
var tmp_2 = asSequence(this$0.eo_1);
|
|
3595
3660
|
// Inline function 'kotlin.sequences.fold' call
|
|
3596
3661
|
var accumulator_2 = 0n;
|
|
3597
3662
|
var _iterator__ex2g4s_2 = map(tmp_2, MovesInfo$moves$delegate$lambda$lambda_2).x();
|
|
@@ -3600,7 +3665,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3600
3665
|
accumulator_2 = accumulator_2 | element_2;
|
|
3601
3666
|
}
|
|
3602
3667
|
var rm = accumulator_2;
|
|
3603
|
-
var tmp_3 = asSequence(this$0.
|
|
3668
|
+
var tmp_3 = asSequence(this$0.fo_1);
|
|
3604
3669
|
// Inline function 'kotlin.sequences.fold' call
|
|
3605
3670
|
var accumulator_3 = 0n;
|
|
3606
3671
|
var _iterator__ex2g4s_3 = map(tmp_3, MovesInfo$moves$delegate$lambda$lambda_3).x();
|
|
@@ -3609,16 +3674,16 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3609
3674
|
accumulator_3 = accumulator_3 | element_3;
|
|
3610
3675
|
}
|
|
3611
3676
|
var qm = accumulator_3;
|
|
3612
|
-
var km = this$0.
|
|
3677
|
+
var km = this$0.go_1.dn_1;
|
|
3613
3678
|
return pm | nm | bm | rm | qm | km;
|
|
3614
3679
|
};
|
|
3615
3680
|
}
|
|
3616
3681
|
function MovesInfo$_get_moves_$ref_54hm5y() {
|
|
3617
|
-
return (p0) => p0.
|
|
3682
|
+
return (p0) => p0.fp();
|
|
3618
3683
|
}
|
|
3619
3684
|
function MovesInfo$movesList$delegate$lambda$slambda_0(this$0) {
|
|
3620
3685
|
var i = new MovesInfo$movesList$delegate$lambda$slambda(this$0);
|
|
3621
|
-
var l = ($this$sequence, $completion) => i.
|
|
3686
|
+
var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
|
|
3622
3687
|
l.$arity = 1;
|
|
3623
3688
|
return l;
|
|
3624
3689
|
}
|
|
@@ -3626,7 +3691,7 @@ function MovesInfo$movesList$delegate$lambda(this$0) {
|
|
|
3626
3691
|
return () => toList(sequence(MovesInfo$movesList$delegate$lambda$slambda_0(this$0)));
|
|
3627
3692
|
}
|
|
3628
3693
|
function MovesInfo$_get_movesList_$ref_o79khg() {
|
|
3629
|
-
return (p0) => p0.
|
|
3694
|
+
return (p0) => p0.gp();
|
|
3630
3695
|
}
|
|
3631
3696
|
var Notation_UCI_instance;
|
|
3632
3697
|
var Notation_SAN_instance;
|
|
@@ -3674,30 +3739,30 @@ function Companion_getInstance_3() {
|
|
|
3674
3739
|
return Companion_instance_3;
|
|
3675
3740
|
}
|
|
3676
3741
|
function parseGame($this, idSupplier) {
|
|
3677
|
-
if (!$this.
|
|
3678
|
-
throw Companion_getInstance_3().
|
|
3742
|
+
if (!$this.qp_1.mp_1.equals(TokenType_LBRACKET_getInstance())) {
|
|
3743
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedPgn($this)));
|
|
3679
3744
|
}
|
|
3680
|
-
while ($this.
|
|
3745
|
+
while ($this.qp_1.mp_1.equals(TokenType_LBRACKET_getInstance())) {
|
|
3681
3746
|
parseTag($this);
|
|
3682
3747
|
}
|
|
3683
|
-
$this.
|
|
3684
|
-
var tmp0_safe_receiver = $this.
|
|
3748
|
+
$this.sp_1 = customGame(GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), null, $this.rp_1, idSupplier);
|
|
3749
|
+
var tmp0_safe_receiver = $this.sp_1;
|
|
3685
3750
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wj_1;
|
|
3686
3751
|
var tmp;
|
|
3687
3752
|
if (tmp1_elvis_lhs == null) {
|
|
3688
|
-
throw Companion_getInstance_3().
|
|
3753
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp("current game can't be null"));
|
|
3689
3754
|
} else {
|
|
3690
3755
|
tmp = tmp1_elvis_lhs;
|
|
3691
3756
|
}
|
|
3692
3757
|
parseMoves($this, tmp);
|
|
3693
|
-
if ($this.
|
|
3694
|
-
var tmp2_safe_receiver = $this.
|
|
3758
|
+
if ($this.qp_1.mp_1.equals(TokenType_RESULT_getInstance())) {
|
|
3759
|
+
var tmp2_safe_receiver = $this.sp_1;
|
|
3695
3760
|
if (tmp2_safe_receiver == null)
|
|
3696
3761
|
null;
|
|
3697
3762
|
else {
|
|
3698
3763
|
// Inline function 'kotlin.apply' call
|
|
3699
3764
|
var tmp_0;
|
|
3700
|
-
switch ($this.
|
|
3765
|
+
switch ($this.qp_1.np_1) {
|
|
3701
3766
|
case '1-0':
|
|
3702
3767
|
tmp_0 = Result_WHITE_WIN_getInstance();
|
|
3703
3768
|
break;
|
|
@@ -3708,80 +3773,80 @@ function parseGame($this, idSupplier) {
|
|
|
3708
3773
|
tmp_0 = Result_DRAW_getInstance();
|
|
3709
3774
|
break;
|
|
3710
3775
|
default:
|
|
3711
|
-
throw Companion_getInstance_3().
|
|
3776
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedPgn($this)));
|
|
3712
3777
|
}
|
|
3713
|
-
tmp2_safe_receiver.
|
|
3778
|
+
tmp2_safe_receiver.nm(tmp_0);
|
|
3714
3779
|
}
|
|
3715
|
-
} else if ($this.
|
|
3716
|
-
var tmp3_safe_receiver = $this.
|
|
3780
|
+
} else if ($this.qp_1.mp_1.equals(TokenType_STAR_getInstance())) {
|
|
3781
|
+
var tmp3_safe_receiver = $this.sp_1;
|
|
3717
3782
|
if (tmp3_safe_receiver == null)
|
|
3718
3783
|
null;
|
|
3719
3784
|
else {
|
|
3720
3785
|
// Inline function 'kotlin.apply' call
|
|
3721
|
-
tmp3_safe_receiver.
|
|
3786
|
+
tmp3_safe_receiver.nm(null);
|
|
3722
3787
|
}
|
|
3723
3788
|
}
|
|
3724
|
-
var tmp4_safe_receiver = $this.
|
|
3789
|
+
var tmp4_safe_receiver = $this.sp_1;
|
|
3725
3790
|
if (tmp4_safe_receiver == null)
|
|
3726
3791
|
null;
|
|
3727
3792
|
else {
|
|
3728
3793
|
// Inline function 'kotlin.let' call
|
|
3729
|
-
tmp4_safe_receiver.
|
|
3730
|
-
$this.
|
|
3794
|
+
tmp4_safe_receiver.tl();
|
|
3795
|
+
$this.up_1.k(tmp4_safe_receiver);
|
|
3731
3796
|
}
|
|
3732
3797
|
reset($this);
|
|
3733
3798
|
}
|
|
3734
3799
|
function reset($this) {
|
|
3735
|
-
$this.
|
|
3800
|
+
$this.sp_1 = null;
|
|
3736
3801
|
var tmp = $this;
|
|
3737
3802
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
3738
|
-
tmp.
|
|
3803
|
+
tmp.rp_1 = LinkedHashMap.v8();
|
|
3739
3804
|
}
|
|
3740
3805
|
function malformedPgn($this) {
|
|
3741
|
-
return 'malformed pgn at line ' + $this.
|
|
3806
|
+
return 'malformed pgn at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.np_1;
|
|
3742
3807
|
}
|
|
3743
3808
|
function nextTokenOrFail($this, failMsg) {
|
|
3744
3809
|
var tmp;
|
|
3745
|
-
if ($this.
|
|
3746
|
-
tmp = $this.
|
|
3810
|
+
if ($this.tp_1.z()) {
|
|
3811
|
+
tmp = $this.tp_1.a1();
|
|
3747
3812
|
} else {
|
|
3748
|
-
throw Companion_getInstance_3().
|
|
3813
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(failMsg));
|
|
3749
3814
|
}
|
|
3750
3815
|
return tmp;
|
|
3751
3816
|
}
|
|
3752
3817
|
function malformedTag($this) {
|
|
3753
|
-
return 'malformed tag at line ' + $this.
|
|
3818
|
+
return 'malformed tag at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.np_1;
|
|
3754
3819
|
}
|
|
3755
3820
|
function parseTag($this) {
|
|
3756
|
-
$this.
|
|
3757
|
-
if (!$this.
|
|
3758
|
-
throw Companion_getInstance_3().
|
|
3821
|
+
$this.qp_1 = nextTokenOrFail($this, malformedTag($this));
|
|
3822
|
+
if (!$this.qp_1.mp_1.equals(TokenType_SYMBOL_getInstance())) {
|
|
3823
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
|
|
3759
3824
|
}
|
|
3760
3825
|
// Inline function 'kotlin.text.lowercase' call
|
|
3761
3826
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3762
|
-
var tagName = $this.
|
|
3827
|
+
var tagName = $this.qp_1.np_1.toLowerCase();
|
|
3763
3828
|
if (tagName === 'eco') {
|
|
3764
3829
|
tagName = 'ECO';
|
|
3765
3830
|
}
|
|
3766
|
-
$this.
|
|
3767
|
-
if (!$this.
|
|
3768
|
-
throw Companion_getInstance_3().
|
|
3831
|
+
$this.qp_1 = nextTokenOrFail($this, malformedTag($this));
|
|
3832
|
+
if (!$this.qp_1.mp_1.equals(TokenType_STRING_getInstance())) {
|
|
3833
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
|
|
3769
3834
|
}
|
|
3770
|
-
var tagValue = $this.
|
|
3771
|
-
var tmp0 = $this.
|
|
3835
|
+
var tagValue = $this.qp_1.np_1;
|
|
3836
|
+
var tmp0 = $this.rp_1;
|
|
3772
3837
|
// Inline function 'kotlin.collections.set' call
|
|
3773
3838
|
var key = tagName;
|
|
3774
3839
|
tmp0.f5(key, tagValue);
|
|
3775
|
-
$this.
|
|
3776
|
-
if ($this.
|
|
3777
|
-
$this.
|
|
3840
|
+
$this.qp_1 = nextTokenOrFail($this, malformedTag($this));
|
|
3841
|
+
if ($this.qp_1.mp_1.equals(TokenType_RBRACKET_getInstance())) {
|
|
3842
|
+
$this.qp_1 = nextTokenOrFail($this, malformedTag($this));
|
|
3778
3843
|
return Unit_instance;
|
|
3779
3844
|
} else {
|
|
3780
|
-
throw Companion_getInstance_3().
|
|
3845
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
|
|
3781
3846
|
}
|
|
3782
3847
|
}
|
|
3783
3848
|
function malformedMoveText($this) {
|
|
3784
|
-
return 'malformed move text at line ' + $this.
|
|
3849
|
+
return 'malformed move text at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.toString();
|
|
3785
3850
|
}
|
|
3786
3851
|
function parseMoves($this, node) {
|
|
3787
3852
|
var move = null;
|
|
@@ -3790,12 +3855,12 @@ function parseMoves($this, node) {
|
|
|
3790
3855
|
var endLineComment = null;
|
|
3791
3856
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3792
3857
|
var suffixAnnotations = ArrayList.h1();
|
|
3793
|
-
if ($this.
|
|
3794
|
-
$this.
|
|
3858
|
+
if ($this.qp_1.mp_1.equals(TokenType_LPAREN_getInstance())) {
|
|
3859
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3795
3860
|
var tmp0_elvis_lhs = node.aj();
|
|
3796
3861
|
var tmp;
|
|
3797
3862
|
if (tmp0_elvis_lhs == null) {
|
|
3798
|
-
throw Companion_getInstance_3().
|
|
3863
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp('node ' + toString_0(node.rk()) + ' has no parent'));
|
|
3799
3864
|
} else {
|
|
3800
3865
|
tmp = tmp0_elvis_lhs;
|
|
3801
3866
|
}
|
|
@@ -3803,45 +3868,45 @@ function parseMoves($this, node) {
|
|
|
3803
3868
|
}
|
|
3804
3869
|
while (move == null) {
|
|
3805
3870
|
var tokenCounter = 0;
|
|
3806
|
-
switch ($this.
|
|
3871
|
+
switch ($this.qp_1.mp_1.m2_1) {
|
|
3807
3872
|
case 10:
|
|
3808
3873
|
break;
|
|
3809
3874
|
case 4:
|
|
3810
3875
|
break;
|
|
3811
3876
|
case 11:
|
|
3812
|
-
initialComment = $this.
|
|
3877
|
+
initialComment = $this.qp_1.np_1;
|
|
3813
3878
|
break;
|
|
3814
3879
|
case 9:
|
|
3815
|
-
move = $this.
|
|
3880
|
+
move = $this.qp_1.np_1;
|
|
3816
3881
|
break;
|
|
3817
3882
|
default:
|
|
3818
|
-
throw Companion_getInstance_3().
|
|
3883
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3819
3884
|
}
|
|
3820
|
-
$this.
|
|
3885
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3821
3886
|
tokenCounter = tokenCounter + 1 | 0;
|
|
3822
3887
|
if (tokenCounter > 10) {
|
|
3823
|
-
throw Companion_getInstance_3().
|
|
3888
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3824
3889
|
}
|
|
3825
3890
|
}
|
|
3826
|
-
$l$loop_0: while (!$this.
|
|
3827
|
-
switch ($this.
|
|
3891
|
+
$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())) {
|
|
3892
|
+
switch ($this.qp_1.mp_1.m2_1) {
|
|
3828
3893
|
case 11:
|
|
3829
|
-
comment = $this.
|
|
3894
|
+
comment = $this.qp_1.np_1;
|
|
3830
3895
|
break;
|
|
3831
3896
|
case 12:
|
|
3832
|
-
endLineComment = $this.
|
|
3897
|
+
endLineComment = $this.qp_1.np_1;
|
|
3833
3898
|
break;
|
|
3834
3899
|
case 5:
|
|
3835
|
-
suffixAnnotations.k(toInt($this.
|
|
3900
|
+
suffixAnnotations.k(toInt($this.qp_1.np_1));
|
|
3836
3901
|
break;
|
|
3837
3902
|
case 2:
|
|
3838
3903
|
break $l$loop_0;
|
|
3839
3904
|
case 3:
|
|
3840
3905
|
break $l$loop_0;
|
|
3841
3906
|
default:
|
|
3842
|
-
throw Companion_getInstance_3().
|
|
3907
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3843
3908
|
}
|
|
3844
|
-
$this.
|
|
3909
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3845
3910
|
}
|
|
3846
3911
|
var tmp_0 = move;
|
|
3847
3912
|
var tmp_1 = initialComment;
|
|
@@ -3857,7 +3922,7 @@ function parseMoves($this, node) {
|
|
|
3857
3922
|
var tmp$ret$2 = tmp_4;
|
|
3858
3923
|
var nextNode = node.wk(tmp_0, tmp_1, tmp_2, tmp_3, tmp$ret$2);
|
|
3859
3924
|
var tmp_5;
|
|
3860
|
-
switch ($this.
|
|
3925
|
+
switch ($this.qp_1.mp_1.m2_1) {
|
|
3861
3926
|
case 10:
|
|
3862
3927
|
tmp_5 = parseMoves($this, nextNode);
|
|
3863
3928
|
break;
|
|
@@ -3865,12 +3930,12 @@ function parseMoves($this, node) {
|
|
|
3865
3930
|
tmp_5 = parseMoves($this, nextNode);
|
|
3866
3931
|
break;
|
|
3867
3932
|
case 2:
|
|
3868
|
-
$this.
|
|
3933
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3869
3934
|
parseMoves($this, node);
|
|
3870
3935
|
tmp_5 = parseMoves($this, nextNode);
|
|
3871
3936
|
break;
|
|
3872
3937
|
case 3:
|
|
3873
|
-
$this.
|
|
3938
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3874
3939
|
return nextNode;
|
|
3875
3940
|
case 7:
|
|
3876
3941
|
tmp_5 = nextNode;
|
|
@@ -3879,21 +3944,21 @@ function parseMoves($this, node) {
|
|
|
3879
3944
|
tmp_5 = nextNode;
|
|
3880
3945
|
break;
|
|
3881
3946
|
default:
|
|
3882
|
-
throw Companion_getInstance_3().
|
|
3947
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3883
3948
|
}
|
|
3884
3949
|
return tmp_5;
|
|
3885
3950
|
}
|
|
3886
3951
|
function *_generator_invoke__zhh2q8_1($this, $this$sequence, $completion) {
|
|
3887
|
-
var tmp = $this$sequence.wd($this.
|
|
3952
|
+
var tmp = $this$sequence.wd($this.wp_1.fn(), $completion);
|
|
3888
3953
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
3889
3954
|
tmp = yield tmp;
|
|
3890
|
-
var tmp_0 = $this$sequence.wd($this.
|
|
3955
|
+
var tmp_0 = $this$sequence.wd($this.wp_1.xp(), $completion);
|
|
3891
3956
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
3892
3957
|
tmp_0 = yield tmp_0;
|
|
3893
|
-
var tmp_1 = $this$sequence.wd($this.
|
|
3958
|
+
var tmp_1 = $this$sequence.wd($this.wp_1.yp(), $completion);
|
|
3894
3959
|
if (tmp_1 === get_COROUTINE_SUSPENDED())
|
|
3895
3960
|
tmp_1 = yield tmp_1;
|
|
3896
|
-
var tmp0_safe_receiver = $this.
|
|
3961
|
+
var tmp0_safe_receiver = $this.wp_1.zp();
|
|
3897
3962
|
if (tmp0_safe_receiver == null)
|
|
3898
3963
|
null;
|
|
3899
3964
|
else {
|
|
@@ -3905,47 +3970,47 @@ function *_generator_invoke__zhh2q8_1($this, $this$sequence, $completion) {
|
|
|
3905
3970
|
return Unit_instance;
|
|
3906
3971
|
}
|
|
3907
3972
|
function PawnMoves$regularMovesList$delegate$lambda$lambda(this$0) {
|
|
3908
|
-
return (it) => this$0.
|
|
3973
|
+
return (it) => this$0.ro_1(this$0.lo_1, countTrailingZeroBits(it));
|
|
3909
3974
|
}
|
|
3910
3975
|
function PawnMoves$regularMovesList$delegate$lambda(this$0) {
|
|
3911
|
-
return () => bitboardToList(this$0.
|
|
3976
|
+
return () => bitboardToList(this$0.no_1, PawnMoves$regularMovesList$delegate$lambda$lambda(this$0));
|
|
3912
3977
|
}
|
|
3913
3978
|
function PawnMoves$_get_regularMovesList_$ref_qve2sg() {
|
|
3914
|
-
return (p0) => p0.
|
|
3979
|
+
return (p0) => p0.fn();
|
|
3915
3980
|
}
|
|
3916
3981
|
function PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0) {
|
|
3917
|
-
return (it) => this$0.
|
|
3982
|
+
return (it) => this$0.ro_1(this$0.lo_1, countTrailingZeroBits(it));
|
|
3918
3983
|
}
|
|
3919
3984
|
function PawnMoves$advanceEpMovesList$delegate$lambda(this$0) {
|
|
3920
|
-
return () => bitboardToList(this$0.
|
|
3985
|
+
return () => bitboardToList(this$0.oo_1, PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0));
|
|
3921
3986
|
}
|
|
3922
3987
|
function PawnMoves$_get_advanceEpMovesList_$ref_k5ega7() {
|
|
3923
|
-
return (p0) => p0.
|
|
3988
|
+
return (p0) => p0.xp();
|
|
3924
3989
|
}
|
|
3925
3990
|
function PawnMoves$promotionMovesList$delegate$lambda$lambda$lambda(this$0, $move) {
|
|
3926
|
-
return (it) => this$0.
|
|
3991
|
+
return (it) => this$0.so_1(this$0.lo_1, countTrailingZeroBits($move), it.m2_1);
|
|
3927
3992
|
}
|
|
3928
3993
|
function PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0) {
|
|
3929
3994
|
return (move) => {
|
|
3930
|
-
var tmp = this$0.
|
|
3995
|
+
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()]);
|
|
3931
3996
|
return toList(map(tmp, PawnMoves$promotionMovesList$delegate$lambda$lambda$lambda(this$0, move)));
|
|
3932
3997
|
};
|
|
3933
3998
|
}
|
|
3934
3999
|
function PawnMoves$promotionMovesList$delegate$lambda(this$0) {
|
|
3935
|
-
return () => bitboardToCollectedList(this$0.
|
|
4000
|
+
return () => bitboardToCollectedList(this$0.po_1, PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0));
|
|
3936
4001
|
}
|
|
3937
4002
|
function PawnMoves$_get_promotionMovesList_$ref_pb8487() {
|
|
3938
|
-
return (p0) => p0.
|
|
4003
|
+
return (p0) => p0.yp();
|
|
3939
4004
|
}
|
|
3940
4005
|
function PawnMoves$epCaptureMove$delegate$lambda(this$0) {
|
|
3941
|
-
return () => !(this$0.
|
|
4006
|
+
return () => !(this$0.qo_1 === 0n) ? moveOf(this$0.lo_1, countTrailingZeroBits(this$0.qo_1)) : null;
|
|
3942
4007
|
}
|
|
3943
4008
|
function PawnMoves$_get_epCaptureMove_$ref_4vz7gq() {
|
|
3944
|
-
return (p0) => p0.
|
|
4009
|
+
return (p0) => p0.zp();
|
|
3945
4010
|
}
|
|
3946
4011
|
function PawnMoves$allMovesList$delegate$lambda$slambda_0(this$0) {
|
|
3947
4012
|
var i = new PawnMoves$allMovesList$delegate$lambda$slambda(this$0);
|
|
3948
|
-
var l = ($this$sequence, $completion) => i.
|
|
4013
|
+
var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
|
|
3949
4014
|
l.$arity = 1;
|
|
3950
4015
|
return l;
|
|
3951
4016
|
}
|
|
@@ -3953,7 +4018,7 @@ function PawnMoves$allMovesList$delegate$lambda(this$0) {
|
|
|
3953
4018
|
return () => toList(sequence(PawnMoves$allMovesList$delegate$lambda$slambda_0(this$0)));
|
|
3954
4019
|
}
|
|
3955
4020
|
function PawnMoves$_get_allMovesList_$ref_s0vg9x() {
|
|
3956
|
-
return (p0) => p0.
|
|
4021
|
+
return (p0) => p0.in();
|
|
3957
4022
|
}
|
|
3958
4023
|
var Piece_EMPTY_instance;
|
|
3959
4024
|
var Piece_WP_instance;
|
|
@@ -4100,46 +4165,46 @@ function _get_moves__e5my0h($this) {
|
|
|
4100
4165
|
return tmp0.h2();
|
|
4101
4166
|
}
|
|
4102
4167
|
function Position$moves$delegate$lambda(this$0) {
|
|
4103
|
-
return () => this$0.
|
|
4168
|
+
return () => this$0.eq().fp();
|
|
4104
4169
|
}
|
|
4105
4170
|
function Position$_get_moves_$ref_1wr6hp() {
|
|
4106
4171
|
return (p0) => _get_moves__e5my0h(p0);
|
|
4107
4172
|
}
|
|
4108
4173
|
function Position$check$delegate$lambda(this$0) {
|
|
4109
|
-
return () => inCheck(this$0.
|
|
4174
|
+
return () => inCheck(this$0.fq(), this$0.fj_1);
|
|
4110
4175
|
}
|
|
4111
4176
|
function Position$_get_check_$ref_tp97h() {
|
|
4112
|
-
return (p0) => p0.
|
|
4177
|
+
return (p0) => p0.gq();
|
|
4113
4178
|
}
|
|
4114
4179
|
function Position$checkmate$delegate$lambda(this$0) {
|
|
4115
|
-
return () => isCheckmate(this$0.
|
|
4180
|
+
return () => isCheckmate(this$0.fq(), this$0.fj_1, _get_moves__e5my0h(this$0));
|
|
4116
4181
|
}
|
|
4117
4182
|
function Position$_get_checkmate_$ref_mwt4hk() {
|
|
4118
|
-
return (p0) => p0.
|
|
4183
|
+
return (p0) => p0.hq();
|
|
4119
4184
|
}
|
|
4120
4185
|
function Position$stalemate$delegate$lambda(this$0) {
|
|
4121
|
-
return () => isStalemate(this$0.
|
|
4186
|
+
return () => isStalemate(this$0.fq(), this$0.fj_1, _get_moves__e5my0h(this$0));
|
|
4122
4187
|
}
|
|
4123
4188
|
function Position$_get_stalemate_$ref_l6lqf() {
|
|
4124
|
-
return (p0) => p0.
|
|
4189
|
+
return (p0) => p0.iq();
|
|
4125
4190
|
}
|
|
4126
4191
|
function Position$lackOfMaterial$delegate$lambda(this$0) {
|
|
4127
|
-
return () => isLackOfMaterial(this$0.
|
|
4192
|
+
return () => isLackOfMaterial(this$0.fq());
|
|
4128
4193
|
}
|
|
4129
4194
|
function Position$_get_lackOfMaterial_$ref_whrjuu() {
|
|
4130
|
-
return (p0) => p0.
|
|
4195
|
+
return (p0) => p0.jq();
|
|
4131
4196
|
}
|
|
4132
4197
|
function Position$fiftyMoves$delegate$lambda(this$0) {
|
|
4133
4198
|
return () => this$0.mj_1 >= 50;
|
|
4134
4199
|
}
|
|
4135
4200
|
function Position$_get_fiftyMoves_$ref_ima66z() {
|
|
4136
|
-
return (p0) => p0.
|
|
4201
|
+
return (p0) => p0.sm();
|
|
4137
4202
|
}
|
|
4138
4203
|
function Position$zobrist$delegate$lambda(this$0) {
|
|
4139
|
-
return () => get_computeZobristHash()(this$0.
|
|
4204
|
+
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);
|
|
4140
4205
|
}
|
|
4141
4206
|
function Position$_get_zobrist_$ref_t8al0g() {
|
|
4142
|
-
return (p0) => p0.
|
|
4207
|
+
return (p0) => p0.kq();
|
|
4143
4208
|
}
|
|
4144
4209
|
function init_io_github_lunalobos_chess4kt_Position(_this__u8e3s4) {
|
|
4145
4210
|
Companion_getInstance_5();
|
|
@@ -4159,13 +4224,13 @@ function init_io_github_lunalobos_chess4kt_Position(_this__u8e3s4) {
|
|
|
4159
4224
|
tmp_5.tj_1 = lazy(Position$zobrist$delegate$lambda(_this__u8e3s4));
|
|
4160
4225
|
}
|
|
4161
4226
|
function RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0) {
|
|
4162
|
-
return (it) => this$0.
|
|
4227
|
+
return (it) => this$0.dp_1(this$0.ap_1, countTrailingZeroBits(it));
|
|
4163
4228
|
}
|
|
4164
4229
|
function RegularPieceMoves$allMovesList$delegate$lambda(this$0) {
|
|
4165
|
-
return () => bitboardToList(this$0.
|
|
4230
|
+
return () => bitboardToList(this$0.cp_1, RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0));
|
|
4166
4231
|
}
|
|
4167
4232
|
function RegularPieceMoves$_get_allMovesList_$ref_ts1d8v() {
|
|
4168
|
-
return (p0) => p0.
|
|
4233
|
+
return (p0) => p0.in();
|
|
4169
4234
|
}
|
|
4170
4235
|
var Side_WHITE_instance;
|
|
4171
4236
|
var Side_BLACK_instance;
|
|
@@ -4828,36 +4893,36 @@ function addToken($this, type, value) {
|
|
|
4828
4893
|
var tmp;
|
|
4829
4894
|
// Inline function 'kotlin.text.isEmpty' call
|
|
4830
4895
|
if (charSequenceLength(value) === 0) {
|
|
4831
|
-
tmp = toString_1(charCodeAt($this.
|
|
4896
|
+
tmp = toString_1(charCodeAt($this.qq_1, $this.rq_1));
|
|
4832
4897
|
} else {
|
|
4833
4898
|
tmp = value;
|
|
4834
4899
|
}
|
|
4835
4900
|
var tmp$ret$2 = tmp;
|
|
4836
|
-
$this.
|
|
4837
|
-
$this.
|
|
4901
|
+
$this.tq_1.k(new Token(type, tmp$ret$2, $this.sq_1));
|
|
4902
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4838
4903
|
}
|
|
4839
4904
|
function addToken$default($this, type, value, $super) {
|
|
4840
4905
|
value = value === VOID ? '' : value;
|
|
4841
4906
|
return addToken($this, type, value);
|
|
4842
4907
|
}
|
|
4843
4908
|
function consumeWhitespace($this) {
|
|
4844
|
-
while ($this.
|
|
4845
|
-
if (charCodeAt($this.
|
|
4846
|
-
$this.
|
|
4909
|
+
while ($this.rq_1 < $this.qq_1.length && isWhitespace(charCodeAt($this.qq_1, $this.rq_1))) {
|
|
4910
|
+
if (charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(10)) {
|
|
4911
|
+
$this.sq_1 = $this.sq_1 + 1 | 0;
|
|
4847
4912
|
}
|
|
4848
|
-
$this.
|
|
4913
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4849
4914
|
}
|
|
4850
4915
|
}
|
|
4851
4916
|
function consumeString($this) {
|
|
4852
|
-
$this.
|
|
4853
|
-
var start = $this.
|
|
4917
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4918
|
+
var start = $this.rq_1;
|
|
4854
4919
|
var value = '';
|
|
4855
|
-
while ($this.
|
|
4856
|
-
var char = charCodeAt($this.
|
|
4920
|
+
while ($this.rq_1 < $this.qq_1.length) {
|
|
4921
|
+
var char = charCodeAt($this.qq_1, $this.rq_1);
|
|
4857
4922
|
if (char === _Char___init__impl__6a9atx(34)) {
|
|
4858
|
-
value = substring_0($this.
|
|
4859
|
-
$this.
|
|
4860
|
-
$this.
|
|
4923
|
+
value = substring_0($this.qq_1, start, $this.rq_1);
|
|
4924
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4925
|
+
$this.tq_1.k(new Token(TokenType_STRING_getInstance(), value, $this.sq_1));
|
|
4861
4926
|
return Unit_instance;
|
|
4862
4927
|
}
|
|
4863
4928
|
var tmp;
|
|
@@ -4869,76 +4934,76 @@ function consumeString($this) {
|
|
|
4869
4934
|
}
|
|
4870
4935
|
if (tmp) {
|
|
4871
4936
|
if (char === _Char___init__impl__6a9atx(10)) {
|
|
4872
|
-
$this.
|
|
4937
|
+
$this.sq_1 = $this.sq_1 + 1 | 0;
|
|
4873
4938
|
}
|
|
4874
4939
|
}
|
|
4875
|
-
$this.
|
|
4940
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4876
4941
|
}
|
|
4877
|
-
throw ParserException.
|
|
4942
|
+
throw ParserException.lp('Unclosed string literal.');
|
|
4878
4943
|
}
|
|
4879
4944
|
function consumeBraceComment($this) {
|
|
4880
|
-
var start = $this.
|
|
4881
|
-
$this.
|
|
4882
|
-
while ($this.
|
|
4883
|
-
if (charCodeAt($this.
|
|
4884
|
-
$this.
|
|
4945
|
+
var start = $this.rq_1;
|
|
4946
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4947
|
+
while ($this.rq_1 < $this.qq_1.length && !(charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(125))) {
|
|
4948
|
+
if (charCodeAt($this.qq_1, $this.rq_1) === _Char___init__impl__6a9atx(10)) {
|
|
4949
|
+
$this.sq_1 = $this.sq_1 + 1 | 0;
|
|
4885
4950
|
}
|
|
4886
|
-
$this.
|
|
4951
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4887
4952
|
}
|
|
4888
|
-
if ($this.
|
|
4889
|
-
$this.
|
|
4953
|
+
if ($this.rq_1 < $this.qq_1.length) {
|
|
4954
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4890
4955
|
}
|
|
4891
4956
|
var tmp = TokenType_COMMENT_getInstance();
|
|
4892
4957
|
// Inline function 'kotlin.text.trim' call
|
|
4893
|
-
var this_0 = substring_0($this.
|
|
4958
|
+
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);
|
|
4894
4959
|
var tmp$ret$0 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
4895
|
-
$this.
|
|
4960
|
+
$this.tq_1.k(new Token(tmp, tmp$ret$0, $this.sq_1));
|
|
4896
4961
|
}
|
|
4897
4962
|
function consumeSemicolonComment($this) {
|
|
4898
|
-
var start = $this.
|
|
4899
|
-
while ($this.
|
|
4900
|
-
$this.
|
|
4963
|
+
var start = $this.rq_1;
|
|
4964
|
+
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))) {
|
|
4965
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4901
4966
|
}
|
|
4902
4967
|
var tmp = TokenType_END_LINE_COMMENT_getInstance();
|
|
4903
4968
|
// Inline function 'kotlin.text.trim' call
|
|
4904
|
-
var this_0 = substring_0($this.
|
|
4969
|
+
var this_0 = substring_0($this.qq_1, start + 1 | 0, $this.rq_1 - 1 | 0);
|
|
4905
4970
|
var tmp$ret$0 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
4906
|
-
$this.
|
|
4971
|
+
$this.tq_1.k(new Token(tmp, tmp$ret$0, $this.sq_1));
|
|
4907
4972
|
}
|
|
4908
4973
|
function consumeNAG($this) {
|
|
4909
|
-
$this.
|
|
4910
|
-
var start = $this.
|
|
4911
|
-
while ($this.
|
|
4912
|
-
$this.
|
|
4974
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4975
|
+
var start = $this.rq_1;
|
|
4976
|
+
while ($this.rq_1 < $this.qq_1.length && isDigit(charCodeAt($this.qq_1, $this.rq_1))) {
|
|
4977
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4913
4978
|
}
|
|
4914
|
-
$this.
|
|
4979
|
+
$this.tq_1.k(new Token(TokenType_NAG_getInstance(), substring_0($this.qq_1, start, $this.rq_1), $this.sq_1));
|
|
4915
4980
|
}
|
|
4916
4981
|
function consumeNumberOrSymbol($this) {
|
|
4917
|
-
var start = $this.
|
|
4918
|
-
var currentPos = $this.
|
|
4919
|
-
while (currentPos < $this.
|
|
4982
|
+
var start = $this.rq_1;
|
|
4983
|
+
var currentPos = $this.rq_1;
|
|
4984
|
+
while (currentPos < $this.qq_1.length && isDigit(charCodeAt($this.qq_1, currentPos))) {
|
|
4920
4985
|
currentPos = currentPos + 1 | 0;
|
|
4921
4986
|
}
|
|
4922
|
-
if (currentPos < $this.
|
|
4923
|
-
$this.
|
|
4924
|
-
$this.
|
|
4987
|
+
if (currentPos < $this.qq_1.length && charCodeAt($this.qq_1, currentPos) === _Char___init__impl__6a9atx(46)) {
|
|
4988
|
+
$this.rq_1 = currentPos;
|
|
4989
|
+
$this.tq_1.k(new Token(TokenType_INTEGER_getInstance(), substring_0($this.qq_1, start, $this.rq_1), $this.sq_1));
|
|
4925
4990
|
} else {
|
|
4926
|
-
$this.
|
|
4991
|
+
$this.rq_1 = start;
|
|
4927
4992
|
consumeSymbol($this);
|
|
4928
4993
|
}
|
|
4929
4994
|
}
|
|
4930
4995
|
function consumeSymbol($this) {
|
|
4931
|
-
var start = $this.
|
|
4932
|
-
$l$loop: while ($this.
|
|
4933
|
-
var char = charCodeAt($this.
|
|
4996
|
+
var start = $this.rq_1;
|
|
4997
|
+
$l$loop: while ($this.rq_1 < $this.qq_1.length) {
|
|
4998
|
+
var char = charCodeAt($this.qq_1, $this.rq_1);
|
|
4934
4999
|
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);
|
|
4935
5000
|
if (isSymbolContinuation) {
|
|
4936
|
-
$this.
|
|
5001
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4937
5002
|
} else {
|
|
4938
5003
|
break $l$loop;
|
|
4939
5004
|
}
|
|
4940
5005
|
}
|
|
4941
|
-
var value = substring_0($this.
|
|
5006
|
+
var value = substring_0($this.qq_1, start, $this.rq_1);
|
|
4942
5007
|
var type;
|
|
4943
5008
|
switch (value) {
|
|
4944
5009
|
case '1-0':
|
|
@@ -4950,7 +5015,7 @@ function consumeSymbol($this) {
|
|
|
4950
5015
|
type = TokenType_SYMBOL_getInstance();
|
|
4951
5016
|
break;
|
|
4952
5017
|
}
|
|
4953
|
-
$this.
|
|
5018
|
+
$this.tq_1.k(new Token(type, value, $this.sq_1));
|
|
4954
5019
|
}
|
|
4955
5020
|
function yieldBishopMoves(visibleSquaresBishop, moveFunction) {
|
|
4956
5021
|
return yieldBishopMoves$lambda(visibleSquaresBishop, moveFunction);
|
|
@@ -5553,7 +5618,7 @@ function strictMatch(idSupplier) {
|
|
|
5553
5618
|
_init_properties_factory_kt__5kmpyw();
|
|
5554
5619
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
5555
5620
|
var tmp$ret$0 = LinkedHashMap.v8();
|
|
5556
|
-
return Game.
|
|
5621
|
+
return Game.rm(tmp$ret$0, GameMode_MATCH_getInstance(), ThreeRepetitionsMode_STRICT_getInstance(), FiftyMovesRuleMode_STRICT_getInstance(), idSupplier);
|
|
5557
5622
|
}
|
|
5558
5623
|
function analysisGame(idSupplier) {
|
|
5559
5624
|
var tmp;
|
|
@@ -5566,7 +5631,7 @@ function analysisGame(idSupplier) {
|
|
|
5566
5631
|
_init_properties_factory_kt__5kmpyw();
|
|
5567
5632
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
5568
5633
|
var tmp$ret$0 = LinkedHashMap.v8();
|
|
5569
|
-
return Game.
|
|
5634
|
+
return Game.rm(tmp$ret$0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), idSupplier);
|
|
5570
5635
|
}
|
|
5571
5636
|
function customGame(gameMode, threeRepetitionsMode, fiftyMovesRuleMode, initialFen, initialTags, idSupplier) {
|
|
5572
5637
|
initialFen = initialFen === VOID ? null : initialFen;
|
|
@@ -5594,7 +5659,7 @@ function customGame(gameMode, threeRepetitionsMode, fiftyMovesRuleMode, initialF
|
|
|
5594
5659
|
// Inline function 'kotlin.collections.set' call
|
|
5595
5660
|
tags.f5('fen', initialFen);
|
|
5596
5661
|
}
|
|
5597
|
-
return Game.
|
|
5662
|
+
return Game.rm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier);
|
|
5598
5663
|
}
|
|
5599
5664
|
function parseGames(pgnInput, idSupplier) {
|
|
5600
5665
|
var tmp;
|
|
@@ -5606,9 +5671,9 @@ function parseGames(pgnInput, idSupplier) {
|
|
|
5606
5671
|
idSupplier = tmp;
|
|
5607
5672
|
_init_properties_factory_kt__5kmpyw();
|
|
5608
5673
|
var tokenizer = new Tokenizer(pgnInput);
|
|
5609
|
-
var tokens = tokenizer.
|
|
5674
|
+
var tokens = tokenizer.uq();
|
|
5610
5675
|
var parser = new Parser(tokens);
|
|
5611
|
-
var games = parser.
|
|
5676
|
+
var games = parser.vp(idSupplier);
|
|
5612
5677
|
return games;
|
|
5613
5678
|
}
|
|
5614
5679
|
function movesMap$lambda(it) {
|
|
@@ -5723,7 +5788,7 @@ function threats$lambda($visibleSquaresKing, $calculators, $visibleSquaresKnight
|
|
|
5723
5788
|
}
|
|
5724
5789
|
function eco$lambda(fen) {
|
|
5725
5790
|
_init_properties_factory_kt__5kmpyw();
|
|
5726
|
-
return Position.
|
|
5791
|
+
return Position.pq(fen);
|
|
5727
5792
|
}
|
|
5728
5793
|
function strictMatch$lambda() {
|
|
5729
5794
|
_init_properties_factory_kt__5kmpyw();
|
|
@@ -5834,7 +5899,7 @@ function _init_properties_factory_kt__5kmpyw() {
|
|
|
5834
5899
|
checkInfo = yieldCheckInfo(get_visibleSquares());
|
|
5835
5900
|
checkMask = yieldCheckMask(get_visibleSquares());
|
|
5836
5901
|
movesInfo = yieldMovesInfo(get_pawnMoves(), get_knightMoves(), get_bishopMoves(), get_rookMoves(), get_queenMoves(), get_kingMoves(), get_checkMask(), get_checkInfo());
|
|
5837
|
-
startpos = Position.
|
|
5902
|
+
startpos = Position.nq();
|
|
5838
5903
|
eco = Eco.hi(eco$lambda);
|
|
5839
5904
|
}
|
|
5840
5905
|
}
|
|
@@ -5849,74 +5914,74 @@ function generateChildren(mi, pos) {
|
|
|
5849
5914
|
}
|
|
5850
5915
|
function pawnTuples(mi, position, children) {
|
|
5851
5916
|
// Inline function 'kotlin.collections.forEach' call
|
|
5852
|
-
var _iterator__ex2g4s = mi.
|
|
5917
|
+
var _iterator__ex2g4s = mi.bo_1.x();
|
|
5853
5918
|
while (_iterator__ex2g4s.z()) {
|
|
5854
5919
|
var element = _iterator__ex2g4s.a1();
|
|
5855
|
-
var tmp = element.
|
|
5920
|
+
var tmp = element.fn();
|
|
5856
5921
|
var tmp_0 = pawnTuples$lambda;
|
|
5857
|
-
generateTuples(tmp, element.
|
|
5858
|
-
generatePromotionTuples(element.
|
|
5859
|
-
var tmp_1 = element.
|
|
5922
|
+
generateTuples(tmp, element.ko_1, element.lo_1, element.mo_1, position, children, tmp_0, pawnTuples$lambda_0);
|
|
5923
|
+
generatePromotionTuples(element.yp(), element.ko_1, element.lo_1, position, children);
|
|
5924
|
+
var tmp_1 = element.xp();
|
|
5860
5925
|
var tmp_2 = pawnTuples$lambda_1;
|
|
5861
|
-
generateTuples(tmp_1, element.
|
|
5862
|
-
var tmp0_safe_receiver = element.
|
|
5926
|
+
generateTuples(tmp_1, element.ko_1, element.lo_1, element.mo_1, position, children, tmp_2, pawnTuples$lambda_2);
|
|
5927
|
+
var tmp0_safe_receiver = element.zp();
|
|
5863
5928
|
if (tmp0_safe_receiver == null)
|
|
5864
5929
|
null;
|
|
5865
5930
|
else {
|
|
5866
5931
|
// Inline function 'kotlin.let' call
|
|
5867
|
-
generateEnPassantCaptureTuple(tmp0_safe_receiver, element.
|
|
5932
|
+
generateEnPassantCaptureTuple(tmp0_safe_receiver, element.ko_1, element.lo_1, position, children);
|
|
5868
5933
|
}
|
|
5869
5934
|
}
|
|
5870
5935
|
}
|
|
5871
5936
|
function knightBishopAndQueenTuples(mi, position, children) {
|
|
5872
5937
|
// Inline function 'kotlin.collections.forEach' call
|
|
5873
|
-
var _iterator__ex2g4s = mi.
|
|
5938
|
+
var _iterator__ex2g4s = mi.co_1.x();
|
|
5874
5939
|
while (_iterator__ex2g4s.z()) {
|
|
5875
5940
|
var element = _iterator__ex2g4s.a1();
|
|
5876
|
-
var tmp = element.
|
|
5941
|
+
var tmp = element.in();
|
|
5877
5942
|
var tmp_0 = knightBishopAndQueenTuples$lambda;
|
|
5878
|
-
generateTuples(tmp, element.
|
|
5943
|
+
generateTuples(tmp, element.zo_1, element.ap_1, element.bp_1, position, children, tmp_0, knightBishopAndQueenTuples$lambda_0);
|
|
5879
5944
|
}
|
|
5880
5945
|
// Inline function 'kotlin.collections.forEach' call
|
|
5881
|
-
var _iterator__ex2g4s_0 = mi.
|
|
5946
|
+
var _iterator__ex2g4s_0 = mi.do_1.x();
|
|
5882
5947
|
while (_iterator__ex2g4s_0.z()) {
|
|
5883
5948
|
var element_0 = _iterator__ex2g4s_0.a1();
|
|
5884
|
-
var tmp_1 = element_0.
|
|
5949
|
+
var tmp_1 = element_0.in();
|
|
5885
5950
|
var tmp_2 = knightBishopAndQueenTuples$lambda_1;
|
|
5886
|
-
generateTuples(tmp_1, element_0.
|
|
5951
|
+
generateTuples(tmp_1, element_0.zo_1, element_0.ap_1, element_0.bp_1, position, children, tmp_2, knightBishopAndQueenTuples$lambda_2);
|
|
5887
5952
|
}
|
|
5888
5953
|
// Inline function 'kotlin.collections.forEach' call
|
|
5889
|
-
var _iterator__ex2g4s_1 = mi.
|
|
5954
|
+
var _iterator__ex2g4s_1 = mi.fo_1.x();
|
|
5890
5955
|
while (_iterator__ex2g4s_1.z()) {
|
|
5891
5956
|
var element_1 = _iterator__ex2g4s_1.a1();
|
|
5892
|
-
var tmp_3 = element_1.
|
|
5957
|
+
var tmp_3 = element_1.in();
|
|
5893
5958
|
var tmp_4 = knightBishopAndQueenTuples$lambda_3;
|
|
5894
|
-
generateTuples(tmp_3, element_1.
|
|
5959
|
+
generateTuples(tmp_3, element_1.zo_1, element_1.ap_1, element_1.bp_1, position, children, tmp_4, knightBishopAndQueenTuples$lambda_4);
|
|
5895
5960
|
}
|
|
5896
5961
|
}
|
|
5897
5962
|
function rookTuples(mi, position, children) {
|
|
5898
5963
|
// Inline function 'kotlin.collections.forEach' call
|
|
5899
|
-
var _iterator__ex2g4s = mi.
|
|
5964
|
+
var _iterator__ex2g4s = mi.eo_1.x();
|
|
5900
5965
|
while (_iterator__ex2g4s.z()) {
|
|
5901
5966
|
var element = _iterator__ex2g4s.a1();
|
|
5902
|
-
var tmp = element.
|
|
5967
|
+
var tmp = element.in();
|
|
5903
5968
|
var tmp_0 = rookTuples$lambda;
|
|
5904
|
-
generateTuples(tmp, element.
|
|
5969
|
+
generateTuples(tmp, element.zo_1, element.ap_1, element.bp_1, position, children, tmp_0, rookTuples$lambda_0);
|
|
5905
5970
|
}
|
|
5906
5971
|
}
|
|
5907
5972
|
function kingTuples(mi, position, children) {
|
|
5908
|
-
var tmp = mi.
|
|
5973
|
+
var tmp = mi.go_1.fn();
|
|
5909
5974
|
var tmp_0 = kingTuples$lambda;
|
|
5910
|
-
generateTuples(tmp, mi.
|
|
5911
|
-
generateCastleTuples(mi.
|
|
5975
|
+
generateTuples(tmp, mi.go_1.vm_1, mi.go_1.wm_1, mi.go_1.xm_1, position, children, tmp_0, kingTuples$lambda_0);
|
|
5976
|
+
generateCastleTuples(mi.go_1.gn(), mi.go_1.vm_1, mi.go_1.wm_1, position, children);
|
|
5912
5977
|
}
|
|
5913
5978
|
function generateTuples(moves, pieceType, square, enemies, position, children, epFunction, castleFunction) {
|
|
5914
5979
|
// Inline function 'kotlin.collections.forEach' call
|
|
5915
5980
|
var _iterator__ex2g4s = moves.x();
|
|
5916
5981
|
while (_iterator__ex2g4s.z()) {
|
|
5917
5982
|
var element = _iterator__ex2g4s.a1();
|
|
5918
|
-
var move = element.
|
|
5919
|
-
var bitboards = position.
|
|
5983
|
+
var move = element.pn_1;
|
|
5984
|
+
var bitboards = position.fq();
|
|
5920
5985
|
var inductionVariable = 0;
|
|
5921
5986
|
if (inductionVariable <= 11)
|
|
5922
5987
|
do {
|
|
@@ -5938,7 +6003,7 @@ function generateTuples(moves, pieceType, square, enemies, position, children, e
|
|
|
5938
6003
|
var isCapture = isPresent(enemies & move);
|
|
5939
6004
|
var isPawnMove = isPresent(move & bitboards[(Piece_BP_getInstance().m2_1 - aux | 0) - 1 | 0]);
|
|
5940
6005
|
var hm = isCapture || isPawnMove ? 0 : position.mj_1 + 1 | 0;
|
|
5941
|
-
var tuple = tupleOf(Position.
|
|
6006
|
+
var tuple = tupleOf(Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm), element);
|
|
5942
6007
|
children.k(tuple);
|
|
5943
6008
|
}
|
|
5944
6009
|
}
|
|
@@ -5947,9 +6012,9 @@ function generatePromotionTuples(moves, pieceType, square, position, children) {
|
|
|
5947
6012
|
var _iterator__ex2g4s = moves.x();
|
|
5948
6013
|
while (_iterator__ex2g4s.z()) {
|
|
5949
6014
|
var element = _iterator__ex2g4s.a1();
|
|
5950
|
-
var move = element.
|
|
5951
|
-
var promotionPiece = element.
|
|
5952
|
-
var bitboards = position.
|
|
6015
|
+
var move = element.pn_1;
|
|
6016
|
+
var promotionPiece = element.rn_1;
|
|
6017
|
+
var bitboards = position.fq();
|
|
5953
6018
|
var inductionVariable = 0;
|
|
5954
6019
|
if (inductionVariable <= 11)
|
|
5955
6020
|
do {
|
|
@@ -6005,15 +6070,15 @@ function generatePromotionTuples(moves, pieceType, square, position, children) {
|
|
|
6005
6070
|
}
|
|
6006
6071
|
var hm = 0;
|
|
6007
6072
|
var ep = -1;
|
|
6008
|
-
var newPosition = Position.
|
|
6073
|
+
var newPosition = Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
|
|
6009
6074
|
children.k(tupleOf(newPosition, element));
|
|
6010
6075
|
}
|
|
6011
6076
|
}
|
|
6012
6077
|
function generateEnPassantCaptureTuple(m, pieceType, originSquare, position, children) {
|
|
6013
|
-
var move = m.
|
|
6078
|
+
var move = m.pn_1;
|
|
6014
6079
|
var whiteMove = position.fj_1;
|
|
6015
6080
|
var capture = shiftLeft(1n, countTrailingZeroBits(move) + (whiteMove ? -8 : 8) | 0);
|
|
6016
|
-
var bitboards = position.
|
|
6081
|
+
var bitboards = position.fq();
|
|
6017
6082
|
var inductionVariable = 0;
|
|
6018
6083
|
if (inductionVariable <= 11)
|
|
6019
6084
|
do {
|
|
@@ -6027,16 +6092,16 @@ function generateEnPassantCaptureTuple(m, pieceType, originSquare, position, chi
|
|
|
6027
6092
|
var hm = 0;
|
|
6028
6093
|
var mc = position.lj_1 + (wm ? 1 : 0) | 0;
|
|
6029
6094
|
var ep = -1;
|
|
6030
|
-
var newPosition = Position.
|
|
6031
|
-
children.k(Tuple.
|
|
6095
|
+
var newPosition = Position.oq(bitboards, wm, ep, position.hj_1, position.ij_1, position.jj_1, position.kj_1, mc, hm);
|
|
6096
|
+
children.k(Tuple.vq(newPosition, m));
|
|
6032
6097
|
}
|
|
6033
6098
|
function generateCastleTuples(moves, kingPiece, square, position, children) {
|
|
6034
6099
|
// Inline function 'kotlin.collections.forEach' call
|
|
6035
6100
|
var _iterator__ex2g4s = moves.x();
|
|
6036
6101
|
while (_iterator__ex2g4s.z()) {
|
|
6037
6102
|
var element = _iterator__ex2g4s.a1();
|
|
6038
|
-
var move = element.
|
|
6039
|
-
var bitboards = position.
|
|
6103
|
+
var move = element.pn_1;
|
|
6104
|
+
var bitboards = position.fq();
|
|
6040
6105
|
var indexedObject = get_indexes();
|
|
6041
6106
|
var inductionVariable = 0;
|
|
6042
6107
|
var last = indexedObject.length;
|
|
@@ -6076,7 +6141,7 @@ function generateCastleTuples(moves, kingPiece, square, position, children) {
|
|
|
6076
6141
|
var hm = position.mj_1 + 1 | 0;
|
|
6077
6142
|
var mc = position.lj_1 + (wm ? 1 : 0) | 0;
|
|
6078
6143
|
var ep = -1;
|
|
6079
|
-
var newPosition = Position.
|
|
6144
|
+
var newPosition = Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
|
|
6080
6145
|
children.k(tupleOf(newPosition, element));
|
|
6081
6146
|
}
|
|
6082
6147
|
}
|
|
@@ -8769,7 +8834,7 @@ function checkCollision(move, moves) {
|
|
|
8769
8834
|
_init_properties_moveFactory_kt__2023o9();
|
|
8770
8835
|
var m = moves[move.hashCode()];
|
|
8771
8836
|
if (!(m == null) && !equals(m, move)) {
|
|
8772
|
-
throw get_logger().
|
|
8837
|
+
throw get_logger().mn(RuntimeException.l7('hash collision for ' + m.toString() + ' and ' + move.toString()));
|
|
8773
8838
|
}
|
|
8774
8839
|
}
|
|
8775
8840
|
function hash(origin, target) {
|
|
@@ -8821,7 +8886,7 @@ function yieldMoves() {
|
|
|
8821
8886
|
while (inductionVariable_0 < last_0) {
|
|
8822
8887
|
var item_0 = white[inductionVariable_0];
|
|
8823
8888
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
8824
|
-
var tmp$ret$13 = Move.
|
|
8889
|
+
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);
|
|
8825
8890
|
destination_1.k(tmp$ret$13);
|
|
8826
8891
|
}
|
|
8827
8892
|
var list = destination_1;
|
|
@@ -8861,7 +8926,7 @@ function yieldMoves() {
|
|
|
8861
8926
|
while (inductionVariable_2 < last_2) {
|
|
8862
8927
|
var item_2 = white[inductionVariable_2];
|
|
8863
8928
|
inductionVariable_2 = inductionVariable_2 + 1 | 0;
|
|
8864
|
-
var tmp$ret$26 = Move.
|
|
8929
|
+
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);
|
|
8865
8930
|
destination_4.k(tmp$ret$26);
|
|
8866
8931
|
}
|
|
8867
8932
|
var list_0 = destination_4;
|
|
@@ -8901,7 +8966,7 @@ function yieldMoves() {
|
|
|
8901
8966
|
while (inductionVariable_4 < last_4) {
|
|
8902
8967
|
var item_4 = white[inductionVariable_4];
|
|
8903
8968
|
inductionVariable_4 = inductionVariable_4 + 1 | 0;
|
|
8904
|
-
var tmp$ret$39 = Move.
|
|
8969
|
+
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);
|
|
8905
8970
|
destination_7.k(tmp$ret$39);
|
|
8906
8971
|
}
|
|
8907
8972
|
var list_1 = destination_7;
|
|
@@ -8944,7 +9009,7 @@ function yieldMoves() {
|
|
|
8944
9009
|
while (inductionVariable_6 < last_6) {
|
|
8945
9010
|
var item_6 = black[inductionVariable_6];
|
|
8946
9011
|
inductionVariable_6 = inductionVariable_6 + 1 | 0;
|
|
8947
|
-
var tmp$ret$55 = Move.
|
|
9012
|
+
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);
|
|
8948
9013
|
destination_10.k(tmp$ret$55);
|
|
8949
9014
|
}
|
|
8950
9015
|
var list_2 = destination_10;
|
|
@@ -8984,7 +9049,7 @@ function yieldMoves() {
|
|
|
8984
9049
|
while (inductionVariable_8 < last_8) {
|
|
8985
9050
|
var item_8 = black[inductionVariable_8];
|
|
8986
9051
|
inductionVariable_8 = inductionVariable_8 + 1 | 0;
|
|
8987
|
-
var tmp$ret$68 = Move.
|
|
9052
|
+
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);
|
|
8988
9053
|
destination_13.k(tmp$ret$68);
|
|
8989
9054
|
}
|
|
8990
9055
|
var list_3 = destination_13;
|
|
@@ -9024,7 +9089,7 @@ function yieldMoves() {
|
|
|
9024
9089
|
while (inductionVariable_10 < last_10) {
|
|
9025
9090
|
var item_10 = black[inductionVariable_10];
|
|
9026
9091
|
inductionVariable_10 = inductionVariable_10 + 1 | 0;
|
|
9027
|
-
var tmp$ret$81 = Move.
|
|
9092
|
+
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);
|
|
9028
9093
|
destination_16.k(tmp$ret$81);
|
|
9029
9094
|
}
|
|
9030
9095
|
var list_4 = destination_16;
|
|
@@ -9047,7 +9112,7 @@ function yieldMoves() {
|
|
|
9047
9112
|
var j = inductionVariable_12;
|
|
9048
9113
|
inductionVariable_12 = inductionVariable_12 + 1 | 0;
|
|
9049
9114
|
if (!(j === i)) {
|
|
9050
|
-
moveList.k(Move.
|
|
9115
|
+
moveList.k(Move.tn(_Bitboard___get_value__impl__9h2kos(Companion_instance.kh([Companion_instance_6.c1(i)])), Companion_instance_6.c1(j).m2_1));
|
|
9051
9116
|
}
|
|
9052
9117
|
}
|
|
9053
9118
|
while (inductionVariable_12 <= 63);
|
|
@@ -9087,7 +9152,7 @@ function yieldMoveFromOriginTarget$lambda($moves) {
|
|
|
9087
9152
|
var tmp0_elvis_lhs = $moves[hash(origin, target)];
|
|
9088
9153
|
var tmp;
|
|
9089
9154
|
if (tmp0_elvis_lhs == null) {
|
|
9090
|
-
throw get_logger().
|
|
9155
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found'));
|
|
9091
9156
|
} else {
|
|
9092
9157
|
tmp = tmp0_elvis_lhs;
|
|
9093
9158
|
}
|
|
@@ -9101,7 +9166,7 @@ function yieldMoveFromOriginTargetPromotion$lambda($moves) {
|
|
|
9101
9166
|
var tmp0_elvis_lhs = $moves[hash(origin, target)];
|
|
9102
9167
|
var tmp_0;
|
|
9103
9168
|
if (tmp0_elvis_lhs == null) {
|
|
9104
|
-
throw get_logger().
|
|
9169
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found'));
|
|
9105
9170
|
} else {
|
|
9106
9171
|
tmp_0 = tmp0_elvis_lhs;
|
|
9107
9172
|
}
|
|
@@ -9110,7 +9175,7 @@ function yieldMoveFromOriginTargetPromotion$lambda($moves) {
|
|
|
9110
9175
|
var tmp1_elvis_lhs = $moves[hash_0(origin, target, promotionPiece)];
|
|
9111
9176
|
var tmp_1;
|
|
9112
9177
|
if (tmp1_elvis_lhs == null) {
|
|
9113
|
-
throw get_logger().
|
|
9178
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found, promotionPiece=' + promotionPiece));
|
|
9114
9179
|
} else {
|
|
9115
9180
|
tmp_1 = tmp1_elvis_lhs;
|
|
9116
9181
|
}
|
|
@@ -9124,7 +9189,7 @@ function yieldMoveFromOriginTargetObjects$lambda($moves) {
|
|
|
9124
9189
|
var tmp0_elvis_lhs = $moves[hash(origin.m2_1, target.m2_1)];
|
|
9125
9190
|
var tmp;
|
|
9126
9191
|
if (tmp0_elvis_lhs == null) {
|
|
9127
|
-
throw get_logger().
|
|
9192
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin.toString() + ', target=' + target.toString() + ' not found'));
|
|
9128
9193
|
} else {
|
|
9129
9194
|
tmp = tmp0_elvis_lhs;
|
|
9130
9195
|
}
|
|
@@ -9136,7 +9201,7 @@ function yieldMoveFromOriginTargetPromotionObjects$lambda($moves) {
|
|
|
9136
9201
|
var tmp0_elvis_lhs = $moves[hash_0(origin.m2_1, target.m2_1, promotionPiece.m2_1)];
|
|
9137
9202
|
var tmp;
|
|
9138
9203
|
if (tmp0_elvis_lhs == null) {
|
|
9139
|
-
throw get_logger().
|
|
9204
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin.toString() + ', target=' + target.toString() + ', promotion=' + promotionPiece.toString() + ' not found'));
|
|
9140
9205
|
} else {
|
|
9141
9206
|
tmp = tmp0_elvis_lhs;
|
|
9142
9207
|
}
|
|
@@ -9148,7 +9213,7 @@ function yieldMoveFromString$lambda($map) {
|
|
|
9148
9213
|
var tmp0_elvis_lhs = $map.j2(move);
|
|
9149
9214
|
var tmp;
|
|
9150
9215
|
if (tmp0_elvis_lhs == null) {
|
|
9151
|
-
throw MoveException.
|
|
9216
|
+
throw MoveException.ao(move + ' is not a valid move string');
|
|
9152
9217
|
} else {
|
|
9153
9218
|
tmp = tmp0_elvis_lhs;
|
|
9154
9219
|
}
|
|
@@ -9366,7 +9431,7 @@ function isStalemate(bitboards, isWhiteMove, legalMoves) {
|
|
|
9366
9431
|
return isInCheck === 0n && legalMoves === 0n;
|
|
9367
9432
|
}
|
|
9368
9433
|
function tupleOf(v1, v2) {
|
|
9369
|
-
return Tuple.
|
|
9434
|
+
return Tuple.vq(v1, v2);
|
|
9370
9435
|
}
|
|
9371
9436
|
function init_io_github_lunalobos_chess4kt_Tuple(_this__u8e3s4) {
|
|
9372
9437
|
}
|
|
@@ -9410,16 +9475,41 @@ function get_VALID_FULL_MOVE_COUNTER_PATTERN() {
|
|
|
9410
9475
|
return VALID_FULL_MOVE_COUNTER_PATTERN;
|
|
9411
9476
|
}
|
|
9412
9477
|
var VALID_FULL_MOVE_COUNTER_PATTERN;
|
|
9413
|
-
function get_PIECES() {
|
|
9414
|
-
_init_properties_util_kt__mcwhvi();
|
|
9415
|
-
return PIECES;
|
|
9416
|
-
}
|
|
9417
|
-
var PIECES;
|
|
9418
9478
|
function get_MOVE_PATTERN() {
|
|
9419
9479
|
_init_properties_util_kt__mcwhvi();
|
|
9420
9480
|
return MOVE_PATTERN;
|
|
9421
9481
|
}
|
|
9422
9482
|
var MOVE_PATTERN;
|
|
9483
|
+
function get_piecesEnglish() {
|
|
9484
|
+
_init_properties_util_kt__mcwhvi();
|
|
9485
|
+
return piecesEnglish;
|
|
9486
|
+
}
|
|
9487
|
+
var piecesEnglish;
|
|
9488
|
+
function get_piecesSpanish() {
|
|
9489
|
+
_init_properties_util_kt__mcwhvi();
|
|
9490
|
+
return piecesSpanish;
|
|
9491
|
+
}
|
|
9492
|
+
var piecesSpanish;
|
|
9493
|
+
function get_piecesGerman() {
|
|
9494
|
+
_init_properties_util_kt__mcwhvi();
|
|
9495
|
+
return piecesGerman;
|
|
9496
|
+
}
|
|
9497
|
+
var piecesGerman;
|
|
9498
|
+
function get_piecesFrench() {
|
|
9499
|
+
_init_properties_util_kt__mcwhvi();
|
|
9500
|
+
return piecesFrench;
|
|
9501
|
+
}
|
|
9502
|
+
var piecesFrench;
|
|
9503
|
+
function get_piecesItalian() {
|
|
9504
|
+
_init_properties_util_kt__mcwhvi();
|
|
9505
|
+
return piecesItalian;
|
|
9506
|
+
}
|
|
9507
|
+
var piecesItalian;
|
|
9508
|
+
function get_piecesDutch() {
|
|
9509
|
+
_init_properties_util_kt__mcwhvi();
|
|
9510
|
+
return piecesDutch;
|
|
9511
|
+
}
|
|
9512
|
+
var piecesDutch;
|
|
9423
9513
|
function getColLetter(square) {
|
|
9424
9514
|
_init_properties_util_kt__mcwhvi();
|
|
9425
9515
|
var colNum = getCol(square);
|
|
@@ -9713,6 +9803,10 @@ function toSquares(_this__u8e3s4) {
|
|
|
9713
9803
|
var tmp = _Bitboard___get_value__impl__9h2kos(_this__u8e3s4);
|
|
9714
9804
|
return bitboardToList(tmp, toSquares$lambda);
|
|
9715
9805
|
}
|
|
9806
|
+
function bitboardToSequence(bitboard, entitiesFactory) {
|
|
9807
|
+
_init_properties_util_kt__mcwhvi();
|
|
9808
|
+
return sequence(bitboardToSequence$slambda_0(bitboard, entitiesFactory));
|
|
9809
|
+
}
|
|
9716
9810
|
function getColIndex(column) {
|
|
9717
9811
|
_init_properties_util_kt__mcwhvi();
|
|
9718
9812
|
return binarySearch(get_COLS(), column);
|
|
@@ -9743,8 +9837,8 @@ function positionFromFen(fen) {
|
|
|
9743
9837
|
if (!isValidFenFormat(fen)) {
|
|
9744
9838
|
throw IllegalArgumentException.s('invalid fen ' + fen);
|
|
9745
9839
|
}
|
|
9746
|
-
var position = Position.
|
|
9747
|
-
var bitboards = Position.
|
|
9840
|
+
var position = Position.pq(fen);
|
|
9841
|
+
var bitboards = Position.pq(fen).fq();
|
|
9748
9842
|
var validCheck = !inCheck(bitboards, !position.fj_1);
|
|
9749
9843
|
var wpBitboards = bitboards[Piece_WP_getInstance().m2_1 - 1 | 0];
|
|
9750
9844
|
var bpBitboards = bitboards[Piece_BP_getInstance().m2_1 - 1 | 0];
|
|
@@ -9857,11 +9951,11 @@ function get_enPassantSquare(_this__u8e3s4) {
|
|
|
9857
9951
|
}
|
|
9858
9952
|
function get_draw(_this__u8e3s4) {
|
|
9859
9953
|
_init_properties_util_kt__mcwhvi();
|
|
9860
|
-
return _this__u8e3s4.
|
|
9954
|
+
return _this__u8e3s4.iq() || _this__u8e3s4.jq();
|
|
9861
9955
|
}
|
|
9862
9956
|
function get_gameOver(_this__u8e3s4) {
|
|
9863
9957
|
_init_properties_util_kt__mcwhvi();
|
|
9864
|
-
return _this__u8e3s4.
|
|
9958
|
+
return _this__u8e3s4.hq() || _this__u8e3s4.iq() || _this__u8e3s4.jq();
|
|
9865
9959
|
}
|
|
9866
9960
|
function get_sideToMove(_this__u8e3s4) {
|
|
9867
9961
|
_init_properties_util_kt__mcwhvi();
|
|
@@ -9869,7 +9963,7 @@ function get_sideToMove(_this__u8e3s4) {
|
|
|
9869
9963
|
}
|
|
9870
9964
|
function get_children(_this__u8e3s4) {
|
|
9871
9965
|
_init_properties_util_kt__mcwhvi();
|
|
9872
|
-
return generateChildren(_this__u8e3s4.
|
|
9966
|
+
return generateChildren(_this__u8e3s4.eq(), _this__u8e3s4);
|
|
9873
9967
|
}
|
|
9874
9968
|
function move(_this__u8e3s4, move) {
|
|
9875
9969
|
_init_properties_util_kt__mcwhvi();
|
|
@@ -9892,7 +9986,7 @@ function move(_this__u8e3s4, move) {
|
|
|
9892
9986
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pk_1;
|
|
9893
9987
|
var tmp;
|
|
9894
9988
|
if (tmp1_elvis_lhs == null) {
|
|
9895
|
-
throw MoveException.
|
|
9989
|
+
throw MoveException.ao('illegal move ' + move.toString());
|
|
9896
9990
|
} else {
|
|
9897
9991
|
tmp = tmp1_elvis_lhs;
|
|
9898
9992
|
}
|
|
@@ -9928,7 +10022,7 @@ function move_0(_this__u8e3s4, move, notation) {
|
|
|
9928
10022
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pk_1;
|
|
9929
10023
|
var tmp_0;
|
|
9930
10024
|
if (tmp1_elvis_lhs == null) {
|
|
9931
|
-
throw MoveException.
|
|
10025
|
+
throw MoveException.ao('illegal move ' + move);
|
|
9932
10026
|
} else {
|
|
9933
10027
|
tmp_0 = tmp1_elvis_lhs;
|
|
9934
10028
|
}
|
|
@@ -9960,7 +10054,7 @@ function move_0(_this__u8e3s4, move, notation) {
|
|
|
9960
10054
|
var tmp2_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pk_1;
|
|
9961
10055
|
var tmp_1;
|
|
9962
10056
|
if (tmp2_elvis_lhs == null) {
|
|
9963
|
-
throw MoveException.
|
|
10057
|
+
throw MoveException.ao('illegal move ' + move);
|
|
9964
10058
|
} else {
|
|
9965
10059
|
tmp_1 = tmp2_elvis_lhs;
|
|
9966
10060
|
}
|
|
@@ -9975,7 +10069,7 @@ function move_0(_this__u8e3s4, move, notation) {
|
|
|
9975
10069
|
}
|
|
9976
10070
|
function isLegal(_this__u8e3s4, move) {
|
|
9977
10071
|
_init_properties_util_kt__mcwhvi();
|
|
9978
|
-
var m = get_moveFromOriginTargetPromotion()(move.
|
|
10072
|
+
var m = get_moveFromOriginTargetPromotion()(move.qn_1, move.sn_1, move.rn_1);
|
|
9979
10073
|
var tmp0 = get_children(_this__u8e3s4);
|
|
9980
10074
|
var tmp$ret$0;
|
|
9981
10075
|
$l$block_0: {
|
|
@@ -10002,107 +10096,6 @@ function isLegal(_this__u8e3s4, move) {
|
|
|
10002
10096
|
}
|
|
10003
10097
|
return tmp$ret$0;
|
|
10004
10098
|
}
|
|
10005
|
-
function toSan(position, move_0) {
|
|
10006
|
-
_init_properties_util_kt__mcwhvi();
|
|
10007
|
-
// Inline function 'kotlin.require' call
|
|
10008
|
-
if (!isLegal(position, move_0)) {
|
|
10009
|
-
var message = 'illegal move ' + move_0.toString() + ' for position ' + position.lq();
|
|
10010
|
-
throw IllegalArgumentException.s(toString(message));
|
|
10011
|
-
}
|
|
10012
|
-
var sbSAN = StringBuilder.u();
|
|
10013
|
-
var piece = get_entries_0().c1(position.kq()[move_0.pn_1]);
|
|
10014
|
-
sbSAN.j8(get_PIECES()[piece.m2_1]);
|
|
10015
|
-
var isPawn = piece.equals(Piece_WP_getInstance()) || piece.equals(Piece_BP_getInstance());
|
|
10016
|
-
var tmp = asSequence(get_children(position));
|
|
10017
|
-
var tmp_0 = map(tmp, toSan$lambda);
|
|
10018
|
-
var tmp_1 = filter(tmp_0, toSan$lambda_0(move_0));
|
|
10019
|
-
var tmp_2 = filter(tmp_1, toSan$lambda_1(position, move_0));
|
|
10020
|
-
var moves = toList(filter(tmp_2, toSan$lambda_2(move_0)));
|
|
10021
|
-
var tmp$ret$2;
|
|
10022
|
-
$l$block_0: {
|
|
10023
|
-
// Inline function 'kotlin.collections.any' call
|
|
10024
|
-
var tmp_3;
|
|
10025
|
-
if (isInterface(moves, Collection)) {
|
|
10026
|
-
tmp_3 = moves.c2();
|
|
10027
|
-
} else {
|
|
10028
|
-
tmp_3 = false;
|
|
10029
|
-
}
|
|
10030
|
-
if (tmp_3) {
|
|
10031
|
-
tmp$ret$2 = false;
|
|
10032
|
-
break $l$block_0;
|
|
10033
|
-
}
|
|
10034
|
-
var _iterator__ex2g4s = moves.x();
|
|
10035
|
-
while (_iterator__ex2g4s.z()) {
|
|
10036
|
-
var element = _iterator__ex2g4s.a1();
|
|
10037
|
-
if (getCol(element.pn_1) === getCol(move_0.pn_1)) {
|
|
10038
|
-
tmp$ret$2 = true;
|
|
10039
|
-
break $l$block_0;
|
|
10040
|
-
}
|
|
10041
|
-
}
|
|
10042
|
-
tmp$ret$2 = false;
|
|
10043
|
-
}
|
|
10044
|
-
var sameColumn = tmp$ret$2;
|
|
10045
|
-
var tmp$ret$4;
|
|
10046
|
-
$l$block_2: {
|
|
10047
|
-
// Inline function 'kotlin.collections.any' call
|
|
10048
|
-
var tmp_4;
|
|
10049
|
-
if (isInterface(moves, Collection)) {
|
|
10050
|
-
tmp_4 = moves.c2();
|
|
10051
|
-
} else {
|
|
10052
|
-
tmp_4 = false;
|
|
10053
|
-
}
|
|
10054
|
-
if (tmp_4) {
|
|
10055
|
-
tmp$ret$4 = false;
|
|
10056
|
-
break $l$block_2;
|
|
10057
|
-
}
|
|
10058
|
-
var _iterator__ex2g4s_0 = moves.x();
|
|
10059
|
-
while (_iterator__ex2g4s_0.z()) {
|
|
10060
|
-
var element_0 = _iterator__ex2g4s_0.a1();
|
|
10061
|
-
if (getRow(element_0.pn_1) === getRow(move_0.pn_1)) {
|
|
10062
|
-
tmp$ret$4 = true;
|
|
10063
|
-
break $l$block_2;
|
|
10064
|
-
}
|
|
10065
|
-
}
|
|
10066
|
-
tmp$ret$4 = false;
|
|
10067
|
-
}
|
|
10068
|
-
var sameRow = tmp$ret$4;
|
|
10069
|
-
if (sameRow && !sameColumn && !isPawn) {
|
|
10070
|
-
sbSAN.j8(getColLetter(move_0.pn_1));
|
|
10071
|
-
}
|
|
10072
|
-
if (!sameRow && sameColumn) {
|
|
10073
|
-
sbSAN.za(getRow(move_0.pn_1) + 1 | 0);
|
|
10074
|
-
}
|
|
10075
|
-
if (sameRow && sameColumn) {
|
|
10076
|
-
sbSAN.j8(getColLetter(move_0.pn_1)).za(getRow(move_0.pn_1) + 1 | 0);
|
|
10077
|
-
}
|
|
10078
|
-
if (!sameRow && !sameColumn && !moves.c2() && !isPawn) {
|
|
10079
|
-
sbSAN.j8(getColLetter(move_0.pn_1));
|
|
10080
|
-
}
|
|
10081
|
-
var capture = !(position.kq()[move_0.rn_1] === Piece_EMPTY_getInstance().m2_1);
|
|
10082
|
-
if (capture) {
|
|
10083
|
-
if (isPawn) {
|
|
10084
|
-
sbSAN.j8(getColLetter(move_0.pn_1));
|
|
10085
|
-
}
|
|
10086
|
-
sbSAN.j8('x');
|
|
10087
|
-
}
|
|
10088
|
-
sbSAN.j8(getColLetter(move_0.rn_1)).za(getRow(move_0.rn_1) + 1 | 0);
|
|
10089
|
-
var isPromotion_0 = !(move_0.qn_1 === -1) && isPromotion(move_0.rn_1) === 1n;
|
|
10090
|
-
if (isPromotion_0) {
|
|
10091
|
-
sbSAN.j8('=').j8(get_PIECES()[move_0.qn_1]);
|
|
10092
|
-
}
|
|
10093
|
-
var isCastle = !!(piece === Piece_WK_getInstance() | piece === Piece_BK_getInstance()) && listOf(['e1g1', 'e1c1', 'e8g8', 'e8c8']).d2(move_0.toString());
|
|
10094
|
-
if (isCastle) {
|
|
10095
|
-
sbSAN = StringBuilder.u();
|
|
10096
|
-
sbSAN.j8(!!(startsWith(move_0.toString(), 'g1', 2) | startsWith(move_0.toString(), 'g8', 2)) ? 'O-O' : 'O-O-O');
|
|
10097
|
-
}
|
|
10098
|
-
var p = move(position, move_0);
|
|
10099
|
-
if (p.gq()) {
|
|
10100
|
-
sbSAN.j8('#');
|
|
10101
|
-
} else if (p.fq()) {
|
|
10102
|
-
sbSAN.j8('+');
|
|
10103
|
-
}
|
|
10104
|
-
return sbSAN.toString();
|
|
10105
|
-
}
|
|
10106
10099
|
function genericHashCode(a) {
|
|
10107
10100
|
_init_properties_util_kt__mcwhvi();
|
|
10108
10101
|
if (a == null)
|
|
@@ -10167,7 +10160,7 @@ function sanToMove(position, sanMove) {
|
|
|
10167
10160
|
var tmp3_elvis_lhs = tmp_0;
|
|
10168
10161
|
var tmp_1;
|
|
10169
10162
|
if (tmp3_elvis_lhs == null) {
|
|
10170
|
-
throw MoveException.
|
|
10163
|
+
throw MoveException.ao('Invalid castling move: ' + sanMove);
|
|
10171
10164
|
} else {
|
|
10172
10165
|
tmp_1 = tmp3_elvis_lhs;
|
|
10173
10166
|
}
|
|
@@ -10186,7 +10179,7 @@ function sanToMove(position, sanMove) {
|
|
|
10186
10179
|
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.zb_1;
|
|
10187
10180
|
var tmp_2;
|
|
10188
10181
|
if (tmp7_elvis_lhs == null) {
|
|
10189
|
-
throw MoveException.
|
|
10182
|
+
throw MoveException.ao('Missing target column in SAN move: ' + sanMove);
|
|
10190
10183
|
} else {
|
|
10191
10184
|
tmp_2 = tmp7_elvis_lhs;
|
|
10192
10185
|
}
|
|
@@ -10195,7 +10188,7 @@ function sanToMove(position, sanMove) {
|
|
|
10195
10188
|
var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.zb_1;
|
|
10196
10189
|
var tmp_3;
|
|
10197
10190
|
if (tmp9_elvis_lhs == null) {
|
|
10198
|
-
throw MoveException.
|
|
10191
|
+
throw MoveException.ao('Missing target row in SAN move: ' + sanMove);
|
|
10199
10192
|
} else {
|
|
10200
10193
|
tmp_3 = tmp9_elvis_lhs;
|
|
10201
10194
|
}
|
|
@@ -10236,7 +10229,7 @@ function sanToMove(position, sanMove) {
|
|
|
10236
10229
|
var xDestiny = getColIndex(targetCol);
|
|
10237
10230
|
var yDestiny = toInt(targetRow) - 1 | 0;
|
|
10238
10231
|
var destinySquare = getSquareIndex(xDestiny, yDestiny);
|
|
10239
|
-
var tmp_6 = asSequence(position.
|
|
10232
|
+
var tmp_6 = asSequence(position.eq().gp());
|
|
10240
10233
|
var tmp_7 = filter(tmp_6, sanToMove$lambda(destinySquare));
|
|
10241
10234
|
var tmp_8 = filter(tmp_7, sanToMove$lambda_0(position, piece));
|
|
10242
10235
|
var tmp0 = filter(tmp_8, sanToMove$lambda_1(origin_1));
|
|
@@ -10247,8 +10240,8 @@ function sanToMove(position, sanMove) {
|
|
|
10247
10240
|
while (_iterator__ex2g4s.z()) {
|
|
10248
10241
|
var element = _iterator__ex2g4s.a1();
|
|
10249
10242
|
var tmp_9;
|
|
10250
|
-
if (!(element.
|
|
10251
|
-
var promotedPieceChar = substring_0(get_entries_0().c1(element.
|
|
10243
|
+
if (!(element.rn_1 === -1)) {
|
|
10244
|
+
var promotedPieceChar = substring_0(get_entries_0().c1(element.rn_1).toString(), 1, 2);
|
|
10252
10245
|
tmp_9 = promotedPieceChar === promotionPieceSAN;
|
|
10253
10246
|
} else {
|
|
10254
10247
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -10264,7 +10257,7 @@ function sanToMove(position, sanMove) {
|
|
|
10264
10257
|
var tmp12_elvis_lhs = tmp$ret$13;
|
|
10265
10258
|
var tmp_10;
|
|
10266
10259
|
if (tmp12_elvis_lhs == null) {
|
|
10267
|
-
throw MoveException.
|
|
10260
|
+
throw MoveException.ao("The move '" + sanMove + "' is not a legal move in the current position " + position.mq());
|
|
10268
10261
|
} else {
|
|
10269
10262
|
tmp_10 = tmp12_elvis_lhs;
|
|
10270
10263
|
}
|
|
@@ -10317,49 +10310,155 @@ function deleteBefore(_this__u8e3s4, node) {
|
|
|
10317
10310
|
var oldParent = tmp;
|
|
10318
10311
|
// Inline function 'kotlin.apply' call
|
|
10319
10312
|
var this_0 = new RootNode(_this__u8e3s4, oldParent.uj());
|
|
10320
|
-
this_0.
|
|
10313
|
+
this_0.gl_1.k(node);
|
|
10321
10314
|
var newParent = this_0;
|
|
10322
10315
|
node.uk(newParent);
|
|
10323
|
-
_this__u8e3s4.
|
|
10316
|
+
_this__u8e3s4.gm(newParent);
|
|
10324
10317
|
var last_0 = last(asSequence_1(_this__u8e3s4.x()));
|
|
10325
|
-
_this__u8e3s4.
|
|
10318
|
+
_this__u8e3s4.vl(last_0);
|
|
10326
10319
|
var tmp0 = _this__u8e3s4.xj_1;
|
|
10327
10320
|
// Inline function 'kotlin.collections.set' call
|
|
10328
|
-
var value = newParent.
|
|
10321
|
+
var value = newParent.el_1.mq();
|
|
10329
10322
|
tmp0.f5('fen', value);
|
|
10330
10323
|
return node;
|
|
10331
10324
|
}
|
|
10332
10325
|
function whiteLacksOfMaterial(_this__u8e3s4) {
|
|
10333
10326
|
_init_properties_util_kt__mcwhvi();
|
|
10334
|
-
return isWhiteLackOfMaterial(_this__u8e3s4.
|
|
10327
|
+
return isWhiteLackOfMaterial(_this__u8e3s4.fq());
|
|
10335
10328
|
}
|
|
10336
10329
|
function blackLacksOfMaterial(_this__u8e3s4) {
|
|
10337
10330
|
_init_properties_util_kt__mcwhvi();
|
|
10338
|
-
return isBlackLackOfMaterial(_this__u8e3s4.
|
|
10331
|
+
return isBlackLackOfMaterial(_this__u8e3s4.fq());
|
|
10339
10332
|
}
|
|
10340
|
-
function
|
|
10333
|
+
function toSan_0(position, move_0, pieces) {
|
|
10334
|
+
pieces = pieces === VOID ? get_piecesEnglish() : pieces;
|
|
10341
10335
|
_init_properties_util_kt__mcwhvi();
|
|
10342
|
-
|
|
10336
|
+
// Inline function 'kotlin.require' call
|
|
10337
|
+
if (!isLegal(position, move_0)) {
|
|
10338
|
+
var message = 'illegal move ' + move_0.toString() + ' for position ' + position.mq();
|
|
10339
|
+
throw IllegalArgumentException.s(toString(message));
|
|
10340
|
+
}
|
|
10341
|
+
var sbSAN = StringBuilder.u();
|
|
10342
|
+
var piece = get_entries_0().c1(position.lq()[move_0.qn_1]);
|
|
10343
|
+
sbSAN.j8(pieces[piece.m2_1]);
|
|
10344
|
+
var isPawn = piece.equals(Piece_WP_getInstance()) || piece.equals(Piece_BP_getInstance());
|
|
10345
|
+
var tmp = asSequence(get_children(position));
|
|
10346
|
+
var tmp_0 = map(tmp, toSan$lambda);
|
|
10347
|
+
var tmp_1 = filter(tmp_0, toSan$lambda_0(move_0));
|
|
10348
|
+
var tmp_2 = filter(tmp_1, toSan$lambda_1(position, move_0));
|
|
10349
|
+
var moves = toList(filter(tmp_2, toSan$lambda_2(move_0)));
|
|
10350
|
+
var tmp$ret$2;
|
|
10351
|
+
$l$block_0: {
|
|
10352
|
+
// Inline function 'kotlin.collections.any' call
|
|
10353
|
+
var tmp_3;
|
|
10354
|
+
if (isInterface(moves, Collection)) {
|
|
10355
|
+
tmp_3 = moves.c2();
|
|
10356
|
+
} else {
|
|
10357
|
+
tmp_3 = false;
|
|
10358
|
+
}
|
|
10359
|
+
if (tmp_3) {
|
|
10360
|
+
tmp$ret$2 = false;
|
|
10361
|
+
break $l$block_0;
|
|
10362
|
+
}
|
|
10363
|
+
var _iterator__ex2g4s = moves.x();
|
|
10364
|
+
while (_iterator__ex2g4s.z()) {
|
|
10365
|
+
var element = _iterator__ex2g4s.a1();
|
|
10366
|
+
if (getCol(element.qn_1) === getCol(move_0.qn_1)) {
|
|
10367
|
+
tmp$ret$2 = true;
|
|
10368
|
+
break $l$block_0;
|
|
10369
|
+
}
|
|
10370
|
+
}
|
|
10371
|
+
tmp$ret$2 = false;
|
|
10372
|
+
}
|
|
10373
|
+
var sameColumn = tmp$ret$2;
|
|
10374
|
+
var tmp$ret$4;
|
|
10375
|
+
$l$block_2: {
|
|
10376
|
+
// Inline function 'kotlin.collections.any' call
|
|
10377
|
+
var tmp_4;
|
|
10378
|
+
if (isInterface(moves, Collection)) {
|
|
10379
|
+
tmp_4 = moves.c2();
|
|
10380
|
+
} else {
|
|
10381
|
+
tmp_4 = false;
|
|
10382
|
+
}
|
|
10383
|
+
if (tmp_4) {
|
|
10384
|
+
tmp$ret$4 = false;
|
|
10385
|
+
break $l$block_2;
|
|
10386
|
+
}
|
|
10387
|
+
var _iterator__ex2g4s_0 = moves.x();
|
|
10388
|
+
while (_iterator__ex2g4s_0.z()) {
|
|
10389
|
+
var element_0 = _iterator__ex2g4s_0.a1();
|
|
10390
|
+
if (getRow(element_0.qn_1) === getRow(move_0.qn_1)) {
|
|
10391
|
+
tmp$ret$4 = true;
|
|
10392
|
+
break $l$block_2;
|
|
10393
|
+
}
|
|
10394
|
+
}
|
|
10395
|
+
tmp$ret$4 = false;
|
|
10396
|
+
}
|
|
10397
|
+
var sameRow = tmp$ret$4;
|
|
10398
|
+
if (sameRow && !sameColumn && !isPawn) {
|
|
10399
|
+
sbSAN.j8(getColLetter(move_0.qn_1));
|
|
10400
|
+
}
|
|
10401
|
+
if (!sameRow && sameColumn) {
|
|
10402
|
+
sbSAN.za(getRow(move_0.qn_1) + 1 | 0);
|
|
10403
|
+
}
|
|
10404
|
+
if (sameRow && sameColumn) {
|
|
10405
|
+
sbSAN.j8(getColLetter(move_0.qn_1)).za(getRow(move_0.qn_1) + 1 | 0);
|
|
10406
|
+
}
|
|
10407
|
+
if (!sameRow && !sameColumn && !moves.c2() && !isPawn) {
|
|
10408
|
+
sbSAN.j8(getColLetter(move_0.qn_1));
|
|
10409
|
+
}
|
|
10410
|
+
var capture = !(position.lq()[move_0.sn_1] === Piece_EMPTY_getInstance().m2_1);
|
|
10411
|
+
if (capture) {
|
|
10412
|
+
if (isPawn) {
|
|
10413
|
+
sbSAN.j8(getColLetter(move_0.qn_1));
|
|
10414
|
+
}
|
|
10415
|
+
sbSAN.j8('x');
|
|
10416
|
+
}
|
|
10417
|
+
sbSAN.j8(getColLetter(move_0.sn_1)).za(getRow(move_0.sn_1) + 1 | 0);
|
|
10418
|
+
var isPromotion_0 = !(move_0.rn_1 === -1) && isPromotion(move_0.sn_1) === 1n;
|
|
10419
|
+
if (isPromotion_0) {
|
|
10420
|
+
sbSAN.j8('=').j8(pieces[move_0.rn_1]);
|
|
10421
|
+
}
|
|
10422
|
+
var isCastle = !!(piece.equals(Piece_WK_getInstance()) | piece.equals(Piece_BK_getInstance())) && listOf(['e1g1', 'e1c1', 'e8g8', 'e8c8']).d2(move_0.toString());
|
|
10423
|
+
if (isCastle) {
|
|
10424
|
+
sbSAN = StringBuilder.u();
|
|
10425
|
+
sbSAN.j8(!!(startsWith(move_0.toString(), 'g1', 2) | startsWith(move_0.toString(), 'g8', 2)) ? 'O-O' : 'O-O-O');
|
|
10426
|
+
}
|
|
10427
|
+
var p = move(position, move_0);
|
|
10428
|
+
if (p.hq()) {
|
|
10429
|
+
sbSAN.j8('#');
|
|
10430
|
+
} else if (p.gq()) {
|
|
10431
|
+
sbSAN.j8('+');
|
|
10432
|
+
}
|
|
10433
|
+
return sbSAN.toString();
|
|
10343
10434
|
}
|
|
10344
|
-
function
|
|
10435
|
+
function toSquares$lambda(it) {
|
|
10345
10436
|
_init_properties_util_kt__mcwhvi();
|
|
10346
|
-
return it
|
|
10347
|
-
}
|
|
10348
|
-
function toSan$lambda_0($move) {
|
|
10349
|
-
return (m) => m.rn_1 === $move.rn_1;
|
|
10437
|
+
return Companion_instance_6.c1(countTrailingZeroBits(it));
|
|
10350
10438
|
}
|
|
10351
|
-
function
|
|
10352
|
-
|
|
10439
|
+
function *_generator_invoke__zhh2q8_2($this, $this$sequence, $completion) {
|
|
10440
|
+
var copy = $this.wq_1;
|
|
10441
|
+
while (!(copy === 0n)) {
|
|
10442
|
+
var lowestOneBit = copy & negate(copy);
|
|
10443
|
+
var tmp = $this$sequence.ud($this.xq_1(lowestOneBit), $completion);
|
|
10444
|
+
if (tmp === get_COROUTINE_SUSPENDED())
|
|
10445
|
+
tmp = yield tmp;
|
|
10446
|
+
copy = copy & ~lowestOneBit;
|
|
10447
|
+
}
|
|
10448
|
+
return Unit_instance;
|
|
10353
10449
|
}
|
|
10354
|
-
function
|
|
10355
|
-
|
|
10450
|
+
function bitboardToSequence$slambda_0($bitboard, $entitiesFactory) {
|
|
10451
|
+
var i = new bitboardToSequence$slambda($bitboard, $entitiesFactory);
|
|
10452
|
+
var l = ($this$sequence, $completion) => i.yq($this$sequence, $completion);
|
|
10453
|
+
l.$arity = 1;
|
|
10454
|
+
return l;
|
|
10356
10455
|
}
|
|
10357
10456
|
function sanToMove$lambda($destinySquare) {
|
|
10358
|
-
return (m) => m.
|
|
10457
|
+
return (m) => m.sn_1 === $destinySquare;
|
|
10359
10458
|
}
|
|
10360
10459
|
function sanToMove$lambda_0($position, $piece) {
|
|
10361
10460
|
return (m) => {
|
|
10362
|
-
var movePiece = get_entries_0().c1($position.
|
|
10461
|
+
var movePiece = get_entries_0().c1($position.lq()[m.qn_1]);
|
|
10363
10462
|
return movePiece.equals($piece);
|
|
10364
10463
|
};
|
|
10365
10464
|
}
|
|
@@ -10371,10 +10470,10 @@ function sanToMove$lambda_1($origin) {
|
|
|
10371
10470
|
var tmp_0;
|
|
10372
10471
|
if (isDigit(first($origin))) {
|
|
10373
10472
|
var row = toInt($origin) - 1 | 0;
|
|
10374
|
-
tmp_0 = getRow(m.
|
|
10473
|
+
tmp_0 = getRow(m.qn_1) === row;
|
|
10375
10474
|
} else {
|
|
10376
10475
|
var col = getColIndex($origin);
|
|
10377
|
-
tmp_0 = getCol(m.
|
|
10476
|
+
tmp_0 = getCol(m.qn_1) === col;
|
|
10378
10477
|
}
|
|
10379
10478
|
|
|
10380
10479
|
tmp = tmp_0;
|
|
@@ -10389,6 +10488,19 @@ function sanToMove$lambda_1($origin) {
|
|
|
10389
10488
|
return tmp;
|
|
10390
10489
|
};
|
|
10391
10490
|
}
|
|
10491
|
+
function toSan$lambda(it) {
|
|
10492
|
+
_init_properties_util_kt__mcwhvi();
|
|
10493
|
+
return it.qk_1;
|
|
10494
|
+
}
|
|
10495
|
+
function toSan$lambda_0($move) {
|
|
10496
|
+
return (m) => m.sn_1 === $move.sn_1;
|
|
10497
|
+
}
|
|
10498
|
+
function toSan$lambda_1($position, $move) {
|
|
10499
|
+
return (m) => get_entries_0().c1($position.lq()[m.qn_1]) === get_entries_0().c1($position.lq()[$move.qn_1]);
|
|
10500
|
+
}
|
|
10501
|
+
function toSan$lambda_2($move) {
|
|
10502
|
+
return (m) => !(m.qn_1 === $move.qn_1);
|
|
10503
|
+
}
|
|
10392
10504
|
var properties_initialized_util_kt_qfsh5w;
|
|
10393
10505
|
function _init_properties_util_kt__mcwhvi() {
|
|
10394
10506
|
if (!properties_initialized_util_kt_qfsh5w) {
|
|
@@ -10404,11 +10516,31 @@ function _init_properties_util_kt__mcwhvi() {
|
|
|
10404
10516
|
VALID_EN_PASSANT_PATTERN = Regex.nb('^[-]{1}$|^[abcdefgh][36]$');
|
|
10405
10517
|
VALID_HALF_MOVE_CLOCK_PATTERN = Regex.nb('^[0123456789]+$');
|
|
10406
10518
|
VALID_FULL_MOVE_COUNTER_PATTERN = Regex.nb('^[1-9][0-9]*$');
|
|
10519
|
+
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>[+#])?');
|
|
10407
10520
|
// Inline function 'kotlin.arrayOf' call
|
|
10408
10521
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
10409
10522
|
// Inline function 'kotlin.js.asDynamic' call
|
|
10410
|
-
|
|
10411
|
-
|
|
10523
|
+
piecesEnglish = ['', '', 'N', 'B', 'R', 'Q', 'K', '', 'N', 'B', 'R', 'Q', 'K'];
|
|
10524
|
+
// Inline function 'kotlin.arrayOf' call
|
|
10525
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
10526
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
10527
|
+
piecesSpanish = ['', '', 'C', 'A', 'T', 'D', 'R', '', 'C', 'A', 'T', 'D', 'R'];
|
|
10528
|
+
// Inline function 'kotlin.arrayOf' call
|
|
10529
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
10530
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
10531
|
+
piecesGerman = ['', '', 'S', 'L', 'T', 'D', 'K', '', 'S', 'L', 'T', 'D', 'K'];
|
|
10532
|
+
// Inline function 'kotlin.arrayOf' call
|
|
10533
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
10534
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
10535
|
+
piecesFrench = ['', '', 'C', 'F', 'T', 'D', 'R', '', 'C', 'F', 'T', 'D', 'R'];
|
|
10536
|
+
// Inline function 'kotlin.arrayOf' call
|
|
10537
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
10538
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
10539
|
+
piecesItalian = ['', '', 'C', 'A', 'T', 'D', 'R', '', 'C', 'A', 'T', 'D', 'R'];
|
|
10540
|
+
// Inline function 'kotlin.arrayOf' call
|
|
10541
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
10542
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
10543
|
+
piecesDutch = ['', '', 'P', 'L', 'T', 'D', 'K', '', 'P', 'L', 'T', 'D', 'K'];
|
|
10412
10544
|
}
|
|
10413
10545
|
}
|
|
10414
10546
|
function yieldComputeVisible() {
|
|
@@ -10707,7 +10839,7 @@ function yieldComputeZobristHash() {
|
|
|
10707
10839
|
}
|
|
10708
10840
|
while (inductionVariable_2 < 64);
|
|
10709
10841
|
var t2 = System_instance.rg();
|
|
10710
|
-
logger.
|
|
10842
|
+
logger.nn(t1, t2);
|
|
10711
10843
|
return yieldComputeZobristHash$lambda(zobristTable, zobristTurn, zobristCastle, zobristEnPassant);
|
|
10712
10844
|
}
|
|
10713
10845
|
function yieldComputeZobristHash$lambda($zobristTable, $zobristTurn, $zobristCastle, $zobristEnPassant) {
|
|
@@ -10782,6 +10914,9 @@ var Companion_instance_7;
|
|
|
10782
10914
|
function Companion_getInstance_7() {
|
|
10783
10915
|
return Companion_instance_7;
|
|
10784
10916
|
}
|
|
10917
|
+
function Bitboard$toArray$lambda(it) {
|
|
10918
|
+
return countTrailingZeroBits(it);
|
|
10919
|
+
}
|
|
10785
10920
|
function Game$toAnalysis$lambda() {
|
|
10786
10921
|
return null;
|
|
10787
10922
|
}
|
|
@@ -10884,19 +11019,19 @@ var properties_initialized_Piece_kt_ae3dia;
|
|
|
10884
11019
|
function _init_properties_Piece_kt__xog22k() {
|
|
10885
11020
|
if (!properties_initialized_Piece_kt_ae3dia) {
|
|
10886
11021
|
properties_initialized_Piece_kt_ae3dia = true;
|
|
10887
|
-
EMPTY_0 = Companion_getInstance_9().
|
|
10888
|
-
WP_0 = Companion_getInstance_9().
|
|
10889
|
-
WN_0 = Companion_getInstance_9().
|
|
10890
|
-
WB_0 = Companion_getInstance_9().
|
|
10891
|
-
WR_0 = Companion_getInstance_9().
|
|
10892
|
-
WQ_0 = Companion_getInstance_9().
|
|
10893
|
-
WK_0 = Companion_getInstance_9().
|
|
10894
|
-
BP_0 = Companion_getInstance_9().
|
|
10895
|
-
BN_0 = Companion_getInstance_9().
|
|
10896
|
-
BB_0 = Companion_getInstance_9().
|
|
10897
|
-
BR_0 = Companion_getInstance_9().
|
|
10898
|
-
BQ_0 = Companion_getInstance_9().
|
|
10899
|
-
BK_0 = Companion_getInstance_9().
|
|
11022
|
+
EMPTY_0 = Companion_getInstance_9().cs_1.c1(0);
|
|
11023
|
+
WP_0 = Companion_getInstance_9().cs_1.c1(1);
|
|
11024
|
+
WN_0 = Companion_getInstance_9().cs_1.c1(2);
|
|
11025
|
+
WB_0 = Companion_getInstance_9().cs_1.c1(3);
|
|
11026
|
+
WR_0 = Companion_getInstance_9().cs_1.c1(4);
|
|
11027
|
+
WQ_0 = Companion_getInstance_9().cs_1.c1(5);
|
|
11028
|
+
WK_0 = Companion_getInstance_9().cs_1.c1(6);
|
|
11029
|
+
BP_0 = Companion_getInstance_9().cs_1.c1(7);
|
|
11030
|
+
BN_0 = Companion_getInstance_9().cs_1.c1(8);
|
|
11031
|
+
BB_0 = Companion_getInstance_9().cs_1.c1(9);
|
|
11032
|
+
BR_0 = Companion_getInstance_9().cs_1.c1(10);
|
|
11033
|
+
BQ_0 = Companion_getInstance_9().cs_1.c1(11);
|
|
11034
|
+
BK_0 = Companion_getInstance_9().cs_1.c1(12);
|
|
10900
11035
|
}
|
|
10901
11036
|
}
|
|
10902
11037
|
function get_WHITE() {
|
|
@@ -10919,8 +11054,8 @@ var properties_initialized_Side_kt_xjv14p;
|
|
|
10919
11054
|
function _init_properties_Side_kt__trrix5() {
|
|
10920
11055
|
if (!properties_initialized_Side_kt_xjv14p) {
|
|
10921
11056
|
properties_initialized_Side_kt_xjv14p = true;
|
|
10922
|
-
WHITE_0 = Companion_getInstance_10().
|
|
10923
|
-
BLACK_0 = Companion_getInstance_10().
|
|
11057
|
+
WHITE_0 = Companion_getInstance_10().us_1.c1(0);
|
|
11058
|
+
BLACK_0 = Companion_getInstance_10().us_1.c1(1);
|
|
10924
11059
|
}
|
|
10925
11060
|
}
|
|
10926
11061
|
function get_A1() {
|
|
@@ -11253,70 +11388,70 @@ var properties_initialized_Square_kt_d57phb;
|
|
|
11253
11388
|
function _init_properties_Square_kt__qeygot() {
|
|
11254
11389
|
if (!properties_initialized_Square_kt_d57phb) {
|
|
11255
11390
|
properties_initialized_Square_kt_d57phb = true;
|
|
11256
|
-
A1_0 = Companion_getInstance_11().
|
|
11257
|
-
B1_0 = Companion_getInstance_11().
|
|
11258
|
-
C1_0 = Companion_getInstance_11().
|
|
11259
|
-
D1_0 = Companion_getInstance_11().
|
|
11260
|
-
E1_0 = Companion_getInstance_11().
|
|
11261
|
-
F1_0 = Companion_getInstance_11().
|
|
11262
|
-
G1_0 = Companion_getInstance_11().
|
|
11263
|
-
H1_0 = Companion_getInstance_11().
|
|
11264
|
-
A2_0 = Companion_getInstance_11().
|
|
11265
|
-
B2_0 = Companion_getInstance_11().
|
|
11266
|
-
C2_0 = Companion_getInstance_11().
|
|
11267
|
-
D2_0 = Companion_getInstance_11().
|
|
11268
|
-
E2_0 = Companion_getInstance_11().
|
|
11269
|
-
F2_0 = Companion_getInstance_11().
|
|
11270
|
-
G2_0 = Companion_getInstance_11().
|
|
11271
|
-
H2_0 = Companion_getInstance_11().
|
|
11272
|
-
A3_0 = Companion_getInstance_11().
|
|
11273
|
-
B3_0 = Companion_getInstance_11().
|
|
11274
|
-
C3_0 = Companion_getInstance_11().
|
|
11275
|
-
D3_0 = Companion_getInstance_11().
|
|
11276
|
-
E3_0 = Companion_getInstance_11().
|
|
11277
|
-
F3_0 = Companion_getInstance_11().
|
|
11278
|
-
G3_0 = Companion_getInstance_11().
|
|
11279
|
-
H3_0 = Companion_getInstance_11().
|
|
11280
|
-
A4_0 = Companion_getInstance_11().
|
|
11281
|
-
B4_0 = Companion_getInstance_11().
|
|
11282
|
-
C4_0 = Companion_getInstance_11().
|
|
11283
|
-
D4_0 = Companion_getInstance_11().
|
|
11284
|
-
E4_0 = Companion_getInstance_11().
|
|
11285
|
-
F4_0 = Companion_getInstance_11().
|
|
11286
|
-
G4_0 = Companion_getInstance_11().
|
|
11287
|
-
H4_0 = Companion_getInstance_11().
|
|
11288
|
-
A5_0 = Companion_getInstance_11().
|
|
11289
|
-
B5_0 = Companion_getInstance_11().
|
|
11290
|
-
C5_0 = Companion_getInstance_11().
|
|
11291
|
-
D5_0 = Companion_getInstance_11().
|
|
11292
|
-
E5_0 = Companion_getInstance_11().
|
|
11293
|
-
F5_0 = Companion_getInstance_11().
|
|
11294
|
-
G5_0 = Companion_getInstance_11().
|
|
11295
|
-
H5_0 = Companion_getInstance_11().
|
|
11296
|
-
A6_0 = Companion_getInstance_11().
|
|
11297
|
-
B6_0 = Companion_getInstance_11().
|
|
11298
|
-
C6_0 = Companion_getInstance_11().
|
|
11299
|
-
D6_0 = Companion_getInstance_11().
|
|
11300
|
-
E6_0 = Companion_getInstance_11().
|
|
11301
|
-
F6_0 = Companion_getInstance_11().
|
|
11302
|
-
G6_0 = Companion_getInstance_11().
|
|
11303
|
-
H6_0 = Companion_getInstance_11().
|
|
11304
|
-
A7_0 = Companion_getInstance_11().
|
|
11305
|
-
B7_0 = Companion_getInstance_11().
|
|
11306
|
-
C7_0 = Companion_getInstance_11().
|
|
11307
|
-
D7_0 = Companion_getInstance_11().
|
|
11308
|
-
E7_0 = Companion_getInstance_11().
|
|
11309
|
-
F7_0 = Companion_getInstance_11().
|
|
11310
|
-
G7_0 = Companion_getInstance_11().
|
|
11311
|
-
H7_0 = Companion_getInstance_11().
|
|
11312
|
-
A8_0 = Companion_getInstance_11().
|
|
11313
|
-
B8_0 = Companion_getInstance_11().
|
|
11314
|
-
C8_0 = Companion_getInstance_11().
|
|
11315
|
-
D8_0 = Companion_getInstance_11().
|
|
11316
|
-
E8_0 = Companion_getInstance_11().
|
|
11317
|
-
F8_0 = Companion_getInstance_11().
|
|
11318
|
-
G8_0 = Companion_getInstance_11().
|
|
11319
|
-
H8_0 = Companion_getInstance_11().
|
|
11391
|
+
A1_0 = Companion_getInstance_11().ws_1.c1(0);
|
|
11392
|
+
B1_0 = Companion_getInstance_11().ws_1.c1(1);
|
|
11393
|
+
C1_0 = Companion_getInstance_11().ws_1.c1(2);
|
|
11394
|
+
D1_0 = Companion_getInstance_11().ws_1.c1(3);
|
|
11395
|
+
E1_0 = Companion_getInstance_11().ws_1.c1(4);
|
|
11396
|
+
F1_0 = Companion_getInstance_11().ws_1.c1(5);
|
|
11397
|
+
G1_0 = Companion_getInstance_11().ws_1.c1(6);
|
|
11398
|
+
H1_0 = Companion_getInstance_11().ws_1.c1(7);
|
|
11399
|
+
A2_0 = Companion_getInstance_11().ws_1.c1(8);
|
|
11400
|
+
B2_0 = Companion_getInstance_11().ws_1.c1(9);
|
|
11401
|
+
C2_0 = Companion_getInstance_11().ws_1.c1(10);
|
|
11402
|
+
D2_0 = Companion_getInstance_11().ws_1.c1(11);
|
|
11403
|
+
E2_0 = Companion_getInstance_11().ws_1.c1(12);
|
|
11404
|
+
F2_0 = Companion_getInstance_11().ws_1.c1(13);
|
|
11405
|
+
G2_0 = Companion_getInstance_11().ws_1.c1(14);
|
|
11406
|
+
H2_0 = Companion_getInstance_11().ws_1.c1(15);
|
|
11407
|
+
A3_0 = Companion_getInstance_11().ws_1.c1(16);
|
|
11408
|
+
B3_0 = Companion_getInstance_11().ws_1.c1(17);
|
|
11409
|
+
C3_0 = Companion_getInstance_11().ws_1.c1(18);
|
|
11410
|
+
D3_0 = Companion_getInstance_11().ws_1.c1(19);
|
|
11411
|
+
E3_0 = Companion_getInstance_11().ws_1.c1(20);
|
|
11412
|
+
F3_0 = Companion_getInstance_11().ws_1.c1(21);
|
|
11413
|
+
G3_0 = Companion_getInstance_11().ws_1.c1(22);
|
|
11414
|
+
H3_0 = Companion_getInstance_11().ws_1.c1(23);
|
|
11415
|
+
A4_0 = Companion_getInstance_11().ws_1.c1(24);
|
|
11416
|
+
B4_0 = Companion_getInstance_11().ws_1.c1(25);
|
|
11417
|
+
C4_0 = Companion_getInstance_11().ws_1.c1(26);
|
|
11418
|
+
D4_0 = Companion_getInstance_11().ws_1.c1(27);
|
|
11419
|
+
E4_0 = Companion_getInstance_11().ws_1.c1(28);
|
|
11420
|
+
F4_0 = Companion_getInstance_11().ws_1.c1(29);
|
|
11421
|
+
G4_0 = Companion_getInstance_11().ws_1.c1(30);
|
|
11422
|
+
H4_0 = Companion_getInstance_11().ws_1.c1(31);
|
|
11423
|
+
A5_0 = Companion_getInstance_11().ws_1.c1(32);
|
|
11424
|
+
B5_0 = Companion_getInstance_11().ws_1.c1(33);
|
|
11425
|
+
C5_0 = Companion_getInstance_11().ws_1.c1(34);
|
|
11426
|
+
D5_0 = Companion_getInstance_11().ws_1.c1(35);
|
|
11427
|
+
E5_0 = Companion_getInstance_11().ws_1.c1(36);
|
|
11428
|
+
F5_0 = Companion_getInstance_11().ws_1.c1(37);
|
|
11429
|
+
G5_0 = Companion_getInstance_11().ws_1.c1(38);
|
|
11430
|
+
H5_0 = Companion_getInstance_11().ws_1.c1(39);
|
|
11431
|
+
A6_0 = Companion_getInstance_11().ws_1.c1(40);
|
|
11432
|
+
B6_0 = Companion_getInstance_11().ws_1.c1(41);
|
|
11433
|
+
C6_0 = Companion_getInstance_11().ws_1.c1(42);
|
|
11434
|
+
D6_0 = Companion_getInstance_11().ws_1.c1(43);
|
|
11435
|
+
E6_0 = Companion_getInstance_11().ws_1.c1(44);
|
|
11436
|
+
F6_0 = Companion_getInstance_11().ws_1.c1(45);
|
|
11437
|
+
G6_0 = Companion_getInstance_11().ws_1.c1(46);
|
|
11438
|
+
H6_0 = Companion_getInstance_11().ws_1.c1(47);
|
|
11439
|
+
A7_0 = Companion_getInstance_11().ws_1.c1(48);
|
|
11440
|
+
B7_0 = Companion_getInstance_11().ws_1.c1(49);
|
|
11441
|
+
C7_0 = Companion_getInstance_11().ws_1.c1(50);
|
|
11442
|
+
D7_0 = Companion_getInstance_11().ws_1.c1(51);
|
|
11443
|
+
E7_0 = Companion_getInstance_11().ws_1.c1(52);
|
|
11444
|
+
F7_0 = Companion_getInstance_11().ws_1.c1(53);
|
|
11445
|
+
G7_0 = Companion_getInstance_11().ws_1.c1(54);
|
|
11446
|
+
H7_0 = Companion_getInstance_11().ws_1.c1(55);
|
|
11447
|
+
A8_0 = Companion_getInstance_11().ws_1.c1(56);
|
|
11448
|
+
B8_0 = Companion_getInstance_11().ws_1.c1(57);
|
|
11449
|
+
C8_0 = Companion_getInstance_11().ws_1.c1(58);
|
|
11450
|
+
D8_0 = Companion_getInstance_11().ws_1.c1(59);
|
|
11451
|
+
E8_0 = Companion_getInstance_11().ws_1.c1(60);
|
|
11452
|
+
F8_0 = Companion_getInstance_11().ws_1.c1(61);
|
|
11453
|
+
G8_0 = Companion_getInstance_11().ws_1.c1(62);
|
|
11454
|
+
H8_0 = Companion_getInstance_11().ws_1.c1(63);
|
|
11320
11455
|
}
|
|
11321
11456
|
}
|
|
11322
11457
|
var Companion_instance_12;
|
|
@@ -11434,12 +11569,14 @@ protoOf(RootNode).xk = promoteChild;
|
|
|
11434
11569
|
protoOf(RootNode).yk = promoteNode;
|
|
11435
11570
|
protoOf(RootNode).zk = removeChild;
|
|
11436
11571
|
protoOf(RootNode).al = hasChildren;
|
|
11572
|
+
protoOf(RootNode).dl = toSan;
|
|
11437
11573
|
initMetadataForClass(RootNode, 'RootNode', VOID, VOID, [Node]);
|
|
11438
11574
|
protoOf(MoveNode).wk = appendMove$default;
|
|
11439
11575
|
protoOf(MoveNode).xk = promoteChild;
|
|
11440
11576
|
protoOf(MoveNode).yk = promoteNode;
|
|
11441
11577
|
protoOf(MoveNode).zk = removeChild;
|
|
11442
11578
|
protoOf(MoveNode).al = hasChildren;
|
|
11579
|
+
protoOf(MoveNode).dl = toSan;
|
|
11443
11580
|
initMetadataForClass(MoveNode, 'MoveNode', VOID, VOID, [Node]);
|
|
11444
11581
|
initMetadataForClass(GameMode, 'GameMode');
|
|
11445
11582
|
initMetadataForClass(ThreeRepetitionsMode, 'ThreeRepetitionsMode');
|
|
@@ -11477,6 +11614,7 @@ initMetadataForClass(Token, 'Token');
|
|
|
11477
11614
|
initMetadataForClass(TokenType, 'TokenType');
|
|
11478
11615
|
initMetadataForClass(Tokenizer, 'Tokenizer');
|
|
11479
11616
|
initMetadataForClass(Tuple, 'Tuple');
|
|
11617
|
+
initMetadataForLambda(bitboardToSequence$slambda, VOID, VOID, [1]);
|
|
11480
11618
|
initMetadataForCompanion(Companion_7);
|
|
11481
11619
|
initMetadataForClass(Bitboard, 'Bitboard');
|
|
11482
11620
|
initMetadataForClass(EcoInfo_0, 'EcoInfo');
|