chess4js 1.0.0-beta.5 → 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 +21 -19
- package/chess4js.d.mts +2 -0
- package/chess4js.mjs +1059 -961
- package/chess4js.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +15 -15
- 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;
|
|
@@ -1985,14 +2024,14 @@ class Tuple {
|
|
|
1985
2024
|
}
|
|
1986
2025
|
class bitboardToSequence$slambda {
|
|
1987
2026
|
constructor($bitboard, $entitiesFactory) {
|
|
1988
|
-
this.
|
|
1989
|
-
this.
|
|
2027
|
+
this.wq_1 = $bitboard;
|
|
2028
|
+
this.xq_1 = $entitiesFactory;
|
|
1990
2029
|
}
|
|
1991
|
-
|
|
2030
|
+
yq($this$sequence, $completion) {
|
|
1992
2031
|
return suspendOrReturn(/*#__NOINLINE__*/_generator_invoke__zhh2q8_2.bind(VOID, this, $this$sequence), $completion);
|
|
1993
2032
|
}
|
|
1994
2033
|
w9(p1, $completion) {
|
|
1995
|
-
return this.
|
|
2034
|
+
return this.yq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
1996
2035
|
}
|
|
1997
2036
|
}
|
|
1998
2037
|
class Companion_7 {
|
|
@@ -2013,11 +2052,11 @@ class Companion_7 {
|
|
|
2013
2052
|
}
|
|
2014
2053
|
class Bitboard {
|
|
2015
2054
|
constructor(value) {
|
|
2016
|
-
this.
|
|
2055
|
+
this.zq_1 = value;
|
|
2017
2056
|
}
|
|
2018
2057
|
toString() {
|
|
2019
2058
|
var sb = StringBuilder.n8(500);
|
|
2020
|
-
var inverted = reverse(Companion_instance_7, this.
|
|
2059
|
+
var inverted = reverse(Companion_instance_7, this.zq_1);
|
|
2021
2060
|
var mask = 255n;
|
|
2022
2061
|
sb.j8('\n+---+---+---+---+---+---+---+---+ \n');
|
|
2023
2062
|
var inductionVariable = 0;
|
|
@@ -2047,73 +2086,73 @@ class Bitboard {
|
|
|
2047
2086
|
return sb.toString();
|
|
2048
2087
|
}
|
|
2049
2088
|
peekLastBit() {
|
|
2050
|
-
return new Bitboard(takeLowestOneBit(this.
|
|
2089
|
+
return new Bitboard(takeLowestOneBit(this.zq_1));
|
|
2051
2090
|
}
|
|
2052
2091
|
peekFirstBit() {
|
|
2053
|
-
return new Bitboard(takeHighestOneBit(this.
|
|
2092
|
+
return new Bitboard(takeHighestOneBit(this.zq_1));
|
|
2054
2093
|
}
|
|
2055
2094
|
trailingZeros() {
|
|
2056
|
-
return countTrailingZeroBits(this.
|
|
2095
|
+
return countTrailingZeroBits(this.zq_1);
|
|
2057
2096
|
}
|
|
2058
2097
|
leadingZeros() {
|
|
2059
|
-
return countLeadingZeroBits(this.
|
|
2098
|
+
return countLeadingZeroBits(this.zq_1);
|
|
2060
2099
|
}
|
|
2061
2100
|
and(other) {
|
|
2062
|
-
return new Bitboard(this.
|
|
2101
|
+
return new Bitboard(this.zq_1 & other.zq_1);
|
|
2063
2102
|
}
|
|
2064
2103
|
or(other) {
|
|
2065
|
-
return new Bitboard(this.
|
|
2104
|
+
return new Bitboard(this.zq_1 | other.zq_1);
|
|
2066
2105
|
}
|
|
2067
2106
|
xor(other) {
|
|
2068
|
-
return new Bitboard(this.
|
|
2107
|
+
return new Bitboard(this.zq_1 ^ other.zq_1);
|
|
2069
2108
|
}
|
|
2070
2109
|
inv() {
|
|
2071
|
-
return new Bitboard(~this.
|
|
2110
|
+
return new Bitboard(~this.zq_1);
|
|
2072
2111
|
}
|
|
2073
2112
|
shl(i) {
|
|
2074
|
-
return new Bitboard(shiftLeft(this.
|
|
2113
|
+
return new Bitboard(shiftLeft(this.zq_1, i));
|
|
2075
2114
|
}
|
|
2076
2115
|
ushr(i) {
|
|
2077
|
-
return new Bitboard(shiftRightUnsigned(this.
|
|
2116
|
+
return new Bitboard(shiftRightUnsigned(this.zq_1, i));
|
|
2078
2117
|
}
|
|
2079
2118
|
toArray() {
|
|
2080
|
-
return toList(bitboardToSequence(this.
|
|
2119
|
+
return toList(bitboardToSequence(this.zq_1, Bitboard$toArray$lambda)).e2();
|
|
2081
2120
|
}
|
|
2082
2121
|
}
|
|
2083
2122
|
class EcoInfo_0 {
|
|
2084
2123
|
constructor(backedEcoInfo) {
|
|
2085
|
-
this.
|
|
2086
|
-
}
|
|
2087
|
-
ar() {
|
|
2088
|
-
return this.zq_1;
|
|
2124
|
+
this.ar_1 = backedEcoInfo;
|
|
2089
2125
|
}
|
|
2090
2126
|
br() {
|
|
2091
|
-
return this.
|
|
2127
|
+
return this.ar_1;
|
|
2092
2128
|
}
|
|
2093
2129
|
cr() {
|
|
2094
|
-
return this.
|
|
2130
|
+
return this.ar_1.mi_1;
|
|
2131
|
+
}
|
|
2132
|
+
dr() {
|
|
2133
|
+
return this.ar_1.li_1;
|
|
2095
2134
|
}
|
|
2096
2135
|
get name() {
|
|
2097
|
-
return this.
|
|
2136
|
+
return this.cr();
|
|
2098
2137
|
}
|
|
2099
2138
|
get eco() {
|
|
2100
|
-
return this.
|
|
2139
|
+
return this.dr();
|
|
2101
2140
|
}
|
|
2102
2141
|
}
|
|
2103
2142
|
class Game_0 {
|
|
2104
2143
|
constructor(backedGame) {
|
|
2105
|
-
this.
|
|
2106
|
-
this.root = new Node_0(this.
|
|
2107
|
-
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;
|
|
2108
2147
|
}
|
|
2109
|
-
|
|
2148
|
+
fr() {
|
|
2110
2149
|
return this.root;
|
|
2111
2150
|
}
|
|
2112
|
-
|
|
2113
|
-
this.
|
|
2151
|
+
gr(value) {
|
|
2152
|
+
this.er_1.mm(value == null ? null : value.ar_1);
|
|
2114
2153
|
}
|
|
2115
|
-
|
|
2116
|
-
var tmp0_safe_receiver = this.
|
|
2154
|
+
hr() {
|
|
2155
|
+
var tmp0_safe_receiver = this.er_1.ek_1;
|
|
2117
2156
|
var tmp;
|
|
2118
2157
|
if (tmp0_safe_receiver == null) {
|
|
2119
2158
|
tmp = null;
|
|
@@ -2123,10 +2162,10 @@ class Game_0 {
|
|
|
2123
2162
|
}
|
|
2124
2163
|
return tmp;
|
|
2125
2164
|
}
|
|
2126
|
-
|
|
2165
|
+
ir() {
|
|
2127
2166
|
return this.id;
|
|
2128
2167
|
}
|
|
2129
|
-
|
|
2168
|
+
jr(value) {
|
|
2130
2169
|
var tmp;
|
|
2131
2170
|
if (value == null) {
|
|
2132
2171
|
tmp = null;
|
|
@@ -2134,58 +2173,58 @@ class Game_0 {
|
|
|
2134
2173
|
// Inline function 'kotlin.let' call
|
|
2135
2174
|
tmp = valueOf_2(value);
|
|
2136
2175
|
}
|
|
2137
|
-
this.
|
|
2176
|
+
this.er_1.nm(tmp);
|
|
2138
2177
|
}
|
|
2139
|
-
|
|
2140
|
-
var tmp0_safe_receiver = this.
|
|
2178
|
+
kr() {
|
|
2179
|
+
var tmp0_safe_receiver = this.er_1.fk_1;
|
|
2141
2180
|
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.toString();
|
|
2142
2181
|
}
|
|
2143
|
-
|
|
2144
|
-
this.
|
|
2145
|
-
}
|
|
2146
|
-
rm() {
|
|
2147
|
-
return this.dr_1.bk_1;
|
|
2182
|
+
km(value) {
|
|
2183
|
+
this.er_1.km(value);
|
|
2148
2184
|
}
|
|
2149
|
-
|
|
2150
|
-
this.
|
|
2185
|
+
sm() {
|
|
2186
|
+
return this.er_1.bk_1;
|
|
2151
2187
|
}
|
|
2152
|
-
|
|
2153
|
-
|
|
2188
|
+
om(value) {
|
|
2189
|
+
this.er_1.om(value);
|
|
2154
2190
|
}
|
|
2155
2191
|
lr() {
|
|
2156
|
-
return this.
|
|
2157
|
-
}
|
|
2158
|
-
om(value) {
|
|
2159
|
-
this.dr_1.om(value);
|
|
2192
|
+
return this.er_1.jk_1;
|
|
2160
2193
|
}
|
|
2161
2194
|
mr() {
|
|
2162
|
-
return this.
|
|
2195
|
+
return this.er_1.hk_1.toString();
|
|
2163
2196
|
}
|
|
2164
|
-
|
|
2165
|
-
this.
|
|
2197
|
+
pm(value) {
|
|
2198
|
+
this.er_1.pm(value);
|
|
2166
2199
|
}
|
|
2167
2200
|
nr() {
|
|
2168
|
-
return this.
|
|
2201
|
+
return this.er_1.kk_1;
|
|
2169
2202
|
}
|
|
2170
|
-
|
|
2171
|
-
this.
|
|
2203
|
+
im(value) {
|
|
2204
|
+
this.er_1.im(value);
|
|
2172
2205
|
}
|
|
2173
2206
|
pr() {
|
|
2174
|
-
return this.
|
|
2207
|
+
return this.er_1.zj_1;
|
|
2175
2208
|
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2209
|
+
lm(value) {
|
|
2210
|
+
this.er_1.lm(value);
|
|
2178
2211
|
}
|
|
2179
|
-
|
|
2180
|
-
this.
|
|
2212
|
+
qr() {
|
|
2213
|
+
return this.er_1.ck_1;
|
|
2181
2214
|
}
|
|
2182
2215
|
rr() {
|
|
2183
|
-
return this.
|
|
2216
|
+
return this.er_1.gk_1.toString();
|
|
2217
|
+
}
|
|
2218
|
+
jm(value) {
|
|
2219
|
+
this.er_1.jm(value);
|
|
2184
2220
|
}
|
|
2185
2221
|
sr() {
|
|
2222
|
+
return this.er_1.ak_1;
|
|
2223
|
+
}
|
|
2224
|
+
tr() {
|
|
2186
2225
|
var p = {};
|
|
2187
2226
|
// Inline function 'kotlin.collections.forEach' call
|
|
2188
|
-
var _iterator__ex2g4s = this.
|
|
2227
|
+
var _iterator__ex2g4s = this.er_1.xj_1.k2().x();
|
|
2189
2228
|
while (_iterator__ex2g4s.z()) {
|
|
2190
2229
|
var element = _iterator__ex2g4s.a1();
|
|
2191
2230
|
p[element.g2()] = element.h2();
|
|
@@ -2194,16 +2233,16 @@ class Game_0 {
|
|
|
2194
2233
|
}
|
|
2195
2234
|
setTag(name, value) {
|
|
2196
2235
|
// Inline function 'kotlin.collections.set' call
|
|
2197
|
-
this.
|
|
2236
|
+
this.er_1.xj_1.f5(name, value);
|
|
2198
2237
|
}
|
|
2199
2238
|
getTag(name) {
|
|
2200
|
-
return this.
|
|
2239
|
+
return this.er_1.xj_1.j2(name);
|
|
2201
2240
|
}
|
|
2202
2241
|
toString() {
|
|
2203
|
-
return this.
|
|
2242
|
+
return this.er_1.toString();
|
|
2204
2243
|
}
|
|
2205
|
-
|
|
2206
|
-
return new Game_0(this.
|
|
2244
|
+
tm(idSupplier) {
|
|
2245
|
+
return new Game_0(this.er_1.tm(idSupplier));
|
|
2207
2246
|
}
|
|
2208
2247
|
toAnalysis(idSupplier, $super) {
|
|
2209
2248
|
var tmp;
|
|
@@ -2213,90 +2252,93 @@ class Game_0 {
|
|
|
2213
2252
|
tmp = idSupplier;
|
|
2214
2253
|
}
|
|
2215
2254
|
idSupplier = tmp;
|
|
2216
|
-
return $super === VOID ? this.
|
|
2255
|
+
return $super === VOID ? this.tm(idSupplier) : $super.tm.call(this, idSupplier);
|
|
2217
2256
|
}
|
|
2218
2257
|
deleteFromExclusive(node) {
|
|
2219
|
-
return new Node_0(deleteFromExclusive(this.
|
|
2258
|
+
return new Node_0(deleteFromExclusive(this.er_1, node.ur_1));
|
|
2220
2259
|
}
|
|
2221
2260
|
deleteFromInclusive(node) {
|
|
2222
|
-
return new Node_0(deleteFromInclusive(this.
|
|
2261
|
+
return new Node_0(deleteFromInclusive(this.er_1, node.ur_1));
|
|
2223
2262
|
}
|
|
2224
2263
|
deleteBefore(_this__u8e3s4, node) {
|
|
2225
|
-
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();
|
|
2226
2268
|
}
|
|
2227
2269
|
get ecoInfo() {
|
|
2228
|
-
return this.
|
|
2270
|
+
return this.hr();
|
|
2229
2271
|
}
|
|
2230
2272
|
set ecoInfo(value) {
|
|
2231
|
-
this.
|
|
2273
|
+
this.gr(value);
|
|
2232
2274
|
}
|
|
2233
2275
|
get result() {
|
|
2234
|
-
return this.
|
|
2276
|
+
return this.kr();
|
|
2235
2277
|
}
|
|
2236
2278
|
set result(value) {
|
|
2237
|
-
this.
|
|
2279
|
+
this.jr(value);
|
|
2238
2280
|
}
|
|
2239
2281
|
get fiftyMoves() {
|
|
2240
|
-
return this.
|
|
2282
|
+
return this.sm();
|
|
2241
2283
|
}
|
|
2242
2284
|
set fiftyMoves(value) {
|
|
2243
|
-
this.
|
|
2285
|
+
this.km(value);
|
|
2244
2286
|
}
|
|
2245
2287
|
get finalComment() {
|
|
2246
|
-
return this.
|
|
2288
|
+
return this.lr();
|
|
2247
2289
|
}
|
|
2248
2290
|
set finalComment(value) {
|
|
2249
|
-
this.
|
|
2291
|
+
this.om(value);
|
|
2250
2292
|
}
|
|
2251
2293
|
get fiftyMovesRuleMode() {
|
|
2252
|
-
return this.
|
|
2294
|
+
return this.mr();
|
|
2253
2295
|
}
|
|
2254
2296
|
get finalEndLineComment() {
|
|
2255
|
-
return this.
|
|
2297
|
+
return this.nr();
|
|
2256
2298
|
}
|
|
2257
2299
|
set finalEndLineComment(value) {
|
|
2258
|
-
this.
|
|
2300
|
+
this.pm(value);
|
|
2259
2301
|
}
|
|
2260
2302
|
get fiveRepetitions() {
|
|
2261
|
-
return this.
|
|
2303
|
+
return this.pr();
|
|
2262
2304
|
}
|
|
2263
2305
|
set fiveRepetitions(value) {
|
|
2264
|
-
this.
|
|
2306
|
+
this.im(value);
|
|
2265
2307
|
}
|
|
2266
2308
|
get seventyFiveMoves() {
|
|
2267
|
-
return this.
|
|
2309
|
+
return this.qr();
|
|
2268
2310
|
}
|
|
2269
2311
|
set seventyFiveMoves(value) {
|
|
2270
|
-
this.
|
|
2312
|
+
this.lm(value);
|
|
2271
2313
|
}
|
|
2272
2314
|
get threeRepetitionsMode() {
|
|
2273
|
-
return this.
|
|
2315
|
+
return this.rr();
|
|
2274
2316
|
}
|
|
2275
2317
|
get threeRepetitionsWarning() {
|
|
2276
|
-
return this.
|
|
2318
|
+
return this.sr();
|
|
2277
2319
|
}
|
|
2278
2320
|
set threeRepetitionsWarning(value) {
|
|
2279
|
-
this.
|
|
2321
|
+
this.jm(value);
|
|
2280
2322
|
}
|
|
2281
2323
|
get tags() {
|
|
2282
|
-
return this.
|
|
2324
|
+
return this.tr();
|
|
2283
2325
|
}
|
|
2284
2326
|
}
|
|
2285
2327
|
class Move_0 {
|
|
2286
2328
|
constructor(backedMove) {
|
|
2287
2329
|
this.backedMove = backedMove;
|
|
2288
2330
|
}
|
|
2289
|
-
ur() {
|
|
2290
|
-
return this.backedMove;
|
|
2291
|
-
}
|
|
2292
2331
|
vr() {
|
|
2293
|
-
return this.backedMove
|
|
2332
|
+
return this.backedMove;
|
|
2294
2333
|
}
|
|
2295
2334
|
wr() {
|
|
2296
|
-
return this.backedMove.
|
|
2335
|
+
return this.backedMove.qn_1;
|
|
2297
2336
|
}
|
|
2298
2337
|
xr() {
|
|
2299
|
-
return this.backedMove.
|
|
2338
|
+
return this.backedMove.sn_1;
|
|
2339
|
+
}
|
|
2340
|
+
yr() {
|
|
2341
|
+
return this.backedMove.rn_1;
|
|
2300
2342
|
}
|
|
2301
2343
|
hashCode() {
|
|
2302
2344
|
return this.backedMove.hashCode();
|
|
@@ -2314,27 +2356,27 @@ class Move_0 {
|
|
|
2314
2356
|
return this.backedMove.toString();
|
|
2315
2357
|
}
|
|
2316
2358
|
get origin() {
|
|
2317
|
-
return this.
|
|
2359
|
+
return this.wr();
|
|
2318
2360
|
}
|
|
2319
2361
|
get target() {
|
|
2320
|
-
return this.
|
|
2362
|
+
return this.xr();
|
|
2321
2363
|
}
|
|
2322
2364
|
get promotionPiece() {
|
|
2323
|
-
return this.
|
|
2365
|
+
return this.yr();
|
|
2324
2366
|
}
|
|
2325
2367
|
}
|
|
2326
2368
|
class Node_0 {
|
|
2327
2369
|
constructor(backedNode) {
|
|
2328
|
-
this.
|
|
2370
|
+
this.ur_1 = backedNode;
|
|
2329
2371
|
}
|
|
2330
|
-
|
|
2331
|
-
return this.
|
|
2372
|
+
zr() {
|
|
2373
|
+
return this.ur_1;
|
|
2332
2374
|
}
|
|
2333
2375
|
uj() {
|
|
2334
|
-
return new Position_0(this.
|
|
2376
|
+
return new Position_0(this.ur_1.uj());
|
|
2335
2377
|
}
|
|
2336
2378
|
rk() {
|
|
2337
|
-
var tmp0_safe_receiver = this.
|
|
2379
|
+
var tmp0_safe_receiver = this.ur_1.rk();
|
|
2338
2380
|
var tmp;
|
|
2339
2381
|
if (tmp0_safe_receiver == null) {
|
|
2340
2382
|
tmp = null;
|
|
@@ -2346,7 +2388,7 @@ class Node_0 {
|
|
|
2346
2388
|
}
|
|
2347
2389
|
bj() {
|
|
2348
2390
|
// Inline function 'kotlin.collections.map' call
|
|
2349
|
-
var this_0 = this.
|
|
2391
|
+
var this_0 = this.ur_1.bj();
|
|
2350
2392
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2351
2393
|
var destination = ArrayList.l5(collectionSizeOrDefault(this_0, 10));
|
|
2352
2394
|
var _iterator__ex2g4s = this_0.x();
|
|
@@ -2358,20 +2400,20 @@ class Node_0 {
|
|
|
2358
2400
|
return destination.e2();
|
|
2359
2401
|
}
|
|
2360
2402
|
sk() {
|
|
2361
|
-
return this.
|
|
2403
|
+
return this.ur_1.sk();
|
|
2362
2404
|
}
|
|
2363
2405
|
cj() {
|
|
2364
|
-
return this.
|
|
2406
|
+
return this.ur_1.cj();
|
|
2365
2407
|
}
|
|
2366
2408
|
dj() {
|
|
2367
|
-
return this.
|
|
2409
|
+
return this.ur_1.dj();
|
|
2368
2410
|
}
|
|
2369
2411
|
tk() {
|
|
2370
|
-
var tmp0_safe_receiver = this.
|
|
2412
|
+
var tmp0_safe_receiver = this.ur_1.tk();
|
|
2371
2413
|
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e2();
|
|
2372
2414
|
}
|
|
2373
2415
|
aj() {
|
|
2374
|
-
var tmp0_safe_receiver = this.
|
|
2416
|
+
var tmp0_safe_receiver = this.ur_1.aj();
|
|
2375
2417
|
var tmp;
|
|
2376
2418
|
if (tmp0_safe_receiver == null) {
|
|
2377
2419
|
tmp = null;
|
|
@@ -2381,7 +2423,7 @@ class Node_0 {
|
|
|
2381
2423
|
}
|
|
2382
2424
|
return tmp;
|
|
2383
2425
|
}
|
|
2384
|
-
|
|
2426
|
+
as(move, initialComment, comment, endLineComment, suffixAnnotations, notation) {
|
|
2385
2427
|
var tmp;
|
|
2386
2428
|
if (suffixAnnotations == null) {
|
|
2387
2429
|
tmp = null;
|
|
@@ -2389,7 +2431,7 @@ class Node_0 {
|
|
|
2389
2431
|
// Inline function 'kotlin.js.collections.toList' call
|
|
2390
2432
|
tmp = createListFrom(suffixAnnotations);
|
|
2391
2433
|
}
|
|
2392
|
-
return new Node_0(this.
|
|
2434
|
+
return new Node_0(this.ur_1.vk(move, initialComment, comment, endLineComment, tmp, valueOf_3(notation.name)));
|
|
2393
2435
|
}
|
|
2394
2436
|
appendMove(move, initialComment, comment, endLineComment, suffixAnnotations, notation, $super) {
|
|
2395
2437
|
initialComment = initialComment === VOID ? null : initialComment;
|
|
@@ -2397,40 +2439,48 @@ class Node_0 {
|
|
|
2397
2439
|
endLineComment = endLineComment === VOID ? null : endLineComment;
|
|
2398
2440
|
suffixAnnotations = suffixAnnotations === VOID ? null : suffixAnnotations;
|
|
2399
2441
|
notation = notation === VOID ? get_SAN() : notation;
|
|
2400
|
-
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);
|
|
2401
2443
|
}
|
|
2402
2444
|
promoteChild(index) {
|
|
2403
|
-
return this.
|
|
2445
|
+
return this.ur_1.xk(index);
|
|
2404
2446
|
}
|
|
2405
2447
|
promoteNode() {
|
|
2406
|
-
return this.
|
|
2448
|
+
return this.ur_1.yk();
|
|
2407
2449
|
}
|
|
2408
2450
|
removeChild(node) {
|
|
2409
|
-
return this.
|
|
2451
|
+
return this.ur_1.zk(node.ur_1);
|
|
2410
2452
|
}
|
|
2411
2453
|
hasChildren() {
|
|
2412
|
-
return this.
|
|
2454
|
+
return this.ur_1.al();
|
|
2413
2455
|
}
|
|
2414
2456
|
belongsToMainLine() {
|
|
2415
|
-
return this.
|
|
2457
|
+
return this.ur_1.bl();
|
|
2416
2458
|
}
|
|
2417
2459
|
copy(parent) {
|
|
2418
|
-
return new Node_0(this.
|
|
2460
|
+
return new Node_0(this.ur_1.cl(parent == null ? null : parent.ur_1));
|
|
2419
2461
|
}
|
|
2420
2462
|
hashCode() {
|
|
2421
|
-
return hashCode(this.
|
|
2463
|
+
return hashCode(this.ur_1);
|
|
2422
2464
|
}
|
|
2423
2465
|
equals(other) {
|
|
2424
2466
|
var tmp;
|
|
2425
2467
|
if (other instanceof Node_0) {
|
|
2426
|
-
tmp = equals(this.
|
|
2468
|
+
tmp = equals(this.ur_1, other.ur_1);
|
|
2427
2469
|
} else {
|
|
2428
2470
|
tmp = false;
|
|
2429
2471
|
}
|
|
2430
2472
|
return tmp;
|
|
2431
2473
|
}
|
|
2432
2474
|
toString() {
|
|
2433
|
-
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);
|
|
2434
2484
|
}
|
|
2435
2485
|
get position() {
|
|
2436
2486
|
return this.uj();
|
|
@@ -2485,13 +2535,13 @@ class Companion_8 {
|
|
|
2485
2535
|
var pair = to(element.l2_1, new Notation_0(element.l2_1));
|
|
2486
2536
|
destination_0.f5(pair.md_1, pair.nd_1);
|
|
2487
2537
|
}
|
|
2488
|
-
tmp_0.
|
|
2538
|
+
tmp_0.bs_1 = destination_0;
|
|
2489
2539
|
}
|
|
2490
2540
|
k2() {
|
|
2491
2541
|
return this.entries;
|
|
2492
2542
|
}
|
|
2493
2543
|
get(name) {
|
|
2494
|
-
return this.
|
|
2544
|
+
return this.bs_1.j2(name);
|
|
2495
2545
|
}
|
|
2496
2546
|
}
|
|
2497
2547
|
class Notation_0 {
|
|
@@ -2499,7 +2549,7 @@ class Notation_0 {
|
|
|
2499
2549
|
Companion_getInstance_8();
|
|
2500
2550
|
this.name = name;
|
|
2501
2551
|
}
|
|
2502
|
-
|
|
2552
|
+
cr() {
|
|
2503
2553
|
return this.name;
|
|
2504
2554
|
}
|
|
2505
2555
|
}
|
|
@@ -2529,7 +2579,7 @@ class Companion_9 {
|
|
|
2529
2579
|
var tmp$ret$3 = new Piece_0(item_0.m2_1, item_0.l2_1);
|
|
2530
2580
|
destination_0.k(tmp$ret$3);
|
|
2531
2581
|
}
|
|
2532
|
-
tmp_0.
|
|
2582
|
+
tmp_0.cs_1 = destination_0;
|
|
2533
2583
|
var tmp_1 = this;
|
|
2534
2584
|
// Inline function 'kotlin.collections.associate' call
|
|
2535
2585
|
var this_2 = get_entries_2();
|
|
@@ -2543,19 +2593,19 @@ class Companion_9 {
|
|
|
2543
2593
|
var pair = to(element.l2_1, new Piece_0(element.m2_1, element.l2_1));
|
|
2544
2594
|
destination_1.f5(pair.md_1, pair.nd_1);
|
|
2545
2595
|
}
|
|
2546
|
-
tmp_1.
|
|
2596
|
+
tmp_1.ds_1 = destination_1;
|
|
2547
2597
|
}
|
|
2548
2598
|
k2() {
|
|
2549
2599
|
return this.entries;
|
|
2550
2600
|
}
|
|
2551
|
-
|
|
2552
|
-
return this.
|
|
2601
|
+
es() {
|
|
2602
|
+
return this.cs_1;
|
|
2553
2603
|
}
|
|
2554
2604
|
get(name) {
|
|
2555
|
-
return this.
|
|
2605
|
+
return this.ds_1.j2(name);
|
|
2556
2606
|
}
|
|
2557
2607
|
indexToPiece(index) {
|
|
2558
|
-
return this.
|
|
2608
|
+
return this.cs_1.c1(index);
|
|
2559
2609
|
}
|
|
2560
2610
|
}
|
|
2561
2611
|
class Piece_0 {
|
|
@@ -2564,19 +2614,19 @@ class Piece_0 {
|
|
|
2564
2614
|
this.ordinal = ordinal;
|
|
2565
2615
|
this.name = name;
|
|
2566
2616
|
}
|
|
2567
|
-
|
|
2617
|
+
fs() {
|
|
2568
2618
|
return this.ordinal;
|
|
2569
2619
|
}
|
|
2570
|
-
|
|
2620
|
+
cr() {
|
|
2571
2621
|
return this.name;
|
|
2572
2622
|
}
|
|
2573
2623
|
}
|
|
2574
2624
|
class Position_0 {
|
|
2575
2625
|
constructor(backedPosition) {
|
|
2576
|
-
this.
|
|
2626
|
+
this.gs_1 = backedPosition;
|
|
2577
2627
|
var tmp = this;
|
|
2578
2628
|
// Inline function 'kotlin.collections.map' call
|
|
2579
|
-
var this_0 = this.
|
|
2629
|
+
var this_0 = this.gs_1.fq();
|
|
2580
2630
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2581
2631
|
var destination = ArrayList.l5(this_0.length);
|
|
2582
2632
|
var inductionVariable = 0;
|
|
@@ -2588,69 +2638,69 @@ class Position_0 {
|
|
|
2588
2638
|
destination.k(tmp$ret$0);
|
|
2589
2639
|
}
|
|
2590
2640
|
tmp.bitboards = destination.e2();
|
|
2591
|
-
this.whiteMove = this.
|
|
2592
|
-
this.enPassant = this.
|
|
2593
|
-
this.whiteCastleKingside = this.
|
|
2594
|
-
this.whiteCastleQueenside = this.
|
|
2595
|
-
this.blackCastleKingside = this.
|
|
2596
|
-
this.blackCastleQueenside = this.
|
|
2597
|
-
this.movesCounter = this.
|
|
2598
|
-
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;
|
|
2599
2649
|
}
|
|
2600
|
-
|
|
2650
|
+
fq() {
|
|
2601
2651
|
return this.bitboards;
|
|
2602
2652
|
}
|
|
2603
|
-
|
|
2653
|
+
hs() {
|
|
2604
2654
|
return this.whiteMove;
|
|
2605
2655
|
}
|
|
2606
|
-
|
|
2656
|
+
is() {
|
|
2607
2657
|
return this.enPassant;
|
|
2608
2658
|
}
|
|
2609
|
-
|
|
2659
|
+
js() {
|
|
2610
2660
|
return this.whiteCastleKingside;
|
|
2611
2661
|
}
|
|
2612
|
-
|
|
2662
|
+
ks() {
|
|
2613
2663
|
return this.whiteCastleQueenside;
|
|
2614
2664
|
}
|
|
2615
|
-
|
|
2665
|
+
ls() {
|
|
2616
2666
|
return this.blackCastleKingside;
|
|
2617
2667
|
}
|
|
2618
|
-
|
|
2668
|
+
ms() {
|
|
2619
2669
|
return this.blackCastleQueenside;
|
|
2620
2670
|
}
|
|
2621
|
-
|
|
2671
|
+
ns() {
|
|
2622
2672
|
return this.movesCounter;
|
|
2623
2673
|
}
|
|
2624
|
-
|
|
2674
|
+
os() {
|
|
2625
2675
|
return this.halfMovesCounter;
|
|
2626
2676
|
}
|
|
2627
|
-
fq() {
|
|
2628
|
-
return this.fs_1.fq();
|
|
2629
|
-
}
|
|
2630
2677
|
gq() {
|
|
2631
|
-
return this.
|
|
2678
|
+
return this.gs_1.gq();
|
|
2632
2679
|
}
|
|
2633
2680
|
hq() {
|
|
2634
|
-
return this.
|
|
2681
|
+
return this.gs_1.hq();
|
|
2635
2682
|
}
|
|
2636
2683
|
iq() {
|
|
2637
|
-
return this.
|
|
2638
|
-
}
|
|
2639
|
-
rm() {
|
|
2640
|
-
return this.fs_1.rm();
|
|
2684
|
+
return this.gs_1.iq();
|
|
2641
2685
|
}
|
|
2642
2686
|
jq() {
|
|
2643
|
-
return
|
|
2687
|
+
return this.gs_1.jq();
|
|
2688
|
+
}
|
|
2689
|
+
sm() {
|
|
2690
|
+
return this.gs_1.sm();
|
|
2644
2691
|
}
|
|
2645
2692
|
kq() {
|
|
2646
|
-
return this.
|
|
2693
|
+
return new Bitboard(this.gs_1.kq());
|
|
2647
2694
|
}
|
|
2648
2695
|
lq() {
|
|
2649
|
-
return this.
|
|
2696
|
+
return this.gs_1.lq();
|
|
2697
|
+
}
|
|
2698
|
+
mq() {
|
|
2699
|
+
return this.gs_1.mq();
|
|
2650
2700
|
}
|
|
2651
2701
|
bj() {
|
|
2652
2702
|
// Inline function 'kotlin.collections.map' call
|
|
2653
|
-
var this_0 = get_children(this.
|
|
2703
|
+
var this_0 = get_children(this.gs_1);
|
|
2654
2704
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2655
2705
|
var destination = ArrayList.l5(collectionSizeOrDefault(this_0, 10));
|
|
2656
2706
|
var _iterator__ex2g4s = this_0.x();
|
|
@@ -2662,11 +2712,11 @@ class Position_0 {
|
|
|
2662
2712
|
}
|
|
2663
2713
|
return destination.e2();
|
|
2664
2714
|
}
|
|
2665
|
-
os() {
|
|
2666
|
-
return get_draw(this.fs_1);
|
|
2667
|
-
}
|
|
2668
2715
|
ps() {
|
|
2669
|
-
|
|
2716
|
+
return get_draw(this.gs_1);
|
|
2717
|
+
}
|
|
2718
|
+
qs() {
|
|
2719
|
+
var tmp0_safe_receiver = get_enPassantSquare(this.gs_1);
|
|
2670
2720
|
var tmp;
|
|
2671
2721
|
if (tmp0_safe_receiver == null) {
|
|
2672
2722
|
tmp = null;
|
|
@@ -2676,87 +2726,87 @@ class Position_0 {
|
|
|
2676
2726
|
}
|
|
2677
2727
|
return tmp;
|
|
2678
2728
|
}
|
|
2679
|
-
qs() {
|
|
2680
|
-
return get_gameOver(this.fs_1);
|
|
2681
|
-
}
|
|
2682
2729
|
rs() {
|
|
2683
|
-
return
|
|
2730
|
+
return get_gameOver(this.gs_1);
|
|
2731
|
+
}
|
|
2732
|
+
ss() {
|
|
2733
|
+
return ensureNotNull(Companion_getInstance_10().get(get_sideToMove(this.gs_1).l2_1));
|
|
2684
2734
|
}
|
|
2685
2735
|
whiteLacksOfMaterial() {
|
|
2686
|
-
return whiteLacksOfMaterial(this.
|
|
2736
|
+
return whiteLacksOfMaterial(this.gs_1);
|
|
2687
2737
|
}
|
|
2688
2738
|
blackLacksOfMaterial() {
|
|
2689
|
-
return blackLacksOfMaterial(this.
|
|
2739
|
+
return blackLacksOfMaterial(this.gs_1);
|
|
2690
2740
|
}
|
|
2691
2741
|
pieceAt(square) {
|
|
2692
|
-
return Companion_getInstance_9().
|
|
2742
|
+
return Companion_getInstance_9().cs_1.c1(this.squares[square.ordinal]);
|
|
2693
2743
|
}
|
|
2694
2744
|
isLegal(move) {
|
|
2695
|
-
return isLegal(this.
|
|
2745
|
+
return isLegal(this.gs_1, move.backedMove);
|
|
2696
2746
|
}
|
|
2697
2747
|
move(move_0) {
|
|
2698
|
-
return new Position_0(move(this.
|
|
2748
|
+
return new Position_0(move(this.gs_1, move_0.backedMove));
|
|
2699
2749
|
}
|
|
2700
|
-
|
|
2701
|
-
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)));
|
|
2702
2752
|
}
|
|
2703
2753
|
moveFromString(move, notation, $super) {
|
|
2704
2754
|
notation = notation === VOID ? get_UCI() : notation;
|
|
2705
|
-
return $super === VOID ? this.
|
|
2755
|
+
return $super === VOID ? this.ts(move, notation) : $super.ts.call(this, move, notation);
|
|
2706
2756
|
}
|
|
2707
2757
|
hashCode() {
|
|
2708
|
-
return this.
|
|
2758
|
+
return this.gs_1.hashCode();
|
|
2709
2759
|
}
|
|
2710
2760
|
equals(other) {
|
|
2711
2761
|
var tmp;
|
|
2712
2762
|
if (other instanceof Position_0) {
|
|
2713
|
-
tmp = this.
|
|
2763
|
+
tmp = this.gs_1.equals(other.gs_1);
|
|
2714
2764
|
} else {
|
|
2715
2765
|
tmp = false;
|
|
2716
2766
|
}
|
|
2717
2767
|
return tmp;
|
|
2718
2768
|
}
|
|
2719
2769
|
toString() {
|
|
2720
|
-
return this.
|
|
2770
|
+
return this.gs_1.toString();
|
|
2721
2771
|
}
|
|
2722
2772
|
get check() {
|
|
2723
|
-
return this.
|
|
2773
|
+
return this.gq();
|
|
2724
2774
|
}
|
|
2725
2775
|
get checkmate() {
|
|
2726
|
-
return this.
|
|
2776
|
+
return this.hq();
|
|
2727
2777
|
}
|
|
2728
2778
|
get stalemate() {
|
|
2729
|
-
return this.
|
|
2779
|
+
return this.iq();
|
|
2730
2780
|
}
|
|
2731
2781
|
get lackOfMaterial() {
|
|
2732
|
-
return this.
|
|
2782
|
+
return this.jq();
|
|
2733
2783
|
}
|
|
2734
2784
|
get fiftyMoves() {
|
|
2735
|
-
return this.
|
|
2785
|
+
return this.sm();
|
|
2736
2786
|
}
|
|
2737
2787
|
get zobrist() {
|
|
2738
|
-
return this.
|
|
2788
|
+
return this.kq();
|
|
2739
2789
|
}
|
|
2740
2790
|
get squares() {
|
|
2741
|
-
return this.
|
|
2791
|
+
return this.lq();
|
|
2742
2792
|
}
|
|
2743
2793
|
get fen() {
|
|
2744
|
-
return this.
|
|
2794
|
+
return this.mq();
|
|
2745
2795
|
}
|
|
2746
2796
|
get children() {
|
|
2747
2797
|
return this.bj();
|
|
2748
2798
|
}
|
|
2749
2799
|
get draw() {
|
|
2750
|
-
return this.
|
|
2800
|
+
return this.ps();
|
|
2751
2801
|
}
|
|
2752
2802
|
get enPassantSquare() {
|
|
2753
|
-
return this.
|
|
2803
|
+
return this.qs();
|
|
2754
2804
|
}
|
|
2755
2805
|
get gameOver() {
|
|
2756
|
-
return this.
|
|
2806
|
+
return this.rs();
|
|
2757
2807
|
}
|
|
2758
2808
|
get sideToMove() {
|
|
2759
|
-
return this.
|
|
2809
|
+
return this.ss();
|
|
2760
2810
|
}
|
|
2761
2811
|
}
|
|
2762
2812
|
class Companion_10 {
|
|
@@ -2773,7 +2823,7 @@ class Companion_10 {
|
|
|
2773
2823
|
var tmp$ret$0 = new Side_0(item.l2_1);
|
|
2774
2824
|
destination.k(tmp$ret$0);
|
|
2775
2825
|
}
|
|
2776
|
-
tmp.
|
|
2826
|
+
tmp.us_1 = destination;
|
|
2777
2827
|
var tmp_0 = this;
|
|
2778
2828
|
// Inline function 'kotlin.collections.map' call
|
|
2779
2829
|
var this_1 = get_entries_1();
|
|
@@ -2799,16 +2849,16 @@ class Companion_10 {
|
|
|
2799
2849
|
var pair = to(element.l2_1, new Side_0(element.l2_1));
|
|
2800
2850
|
destination_1.f5(pair.md_1, pair.nd_1);
|
|
2801
2851
|
}
|
|
2802
|
-
tmp_1.
|
|
2852
|
+
tmp_1.vs_1 = destination_1;
|
|
2803
2853
|
}
|
|
2804
|
-
|
|
2805
|
-
return this.
|
|
2854
|
+
es() {
|
|
2855
|
+
return this.us_1;
|
|
2806
2856
|
}
|
|
2807
2857
|
k2() {
|
|
2808
2858
|
return this.entries;
|
|
2809
2859
|
}
|
|
2810
2860
|
get(name) {
|
|
2811
|
-
return this.
|
|
2861
|
+
return this.vs_1.j2(name);
|
|
2812
2862
|
}
|
|
2813
2863
|
}
|
|
2814
2864
|
class Side_0 {
|
|
@@ -2816,7 +2866,7 @@ class Side_0 {
|
|
|
2816
2866
|
Companion_getInstance_10();
|
|
2817
2867
|
this.name = name;
|
|
2818
2868
|
}
|
|
2819
|
-
|
|
2869
|
+
cr() {
|
|
2820
2870
|
return this.name;
|
|
2821
2871
|
}
|
|
2822
2872
|
}
|
|
@@ -2846,7 +2896,7 @@ class Companion_11 {
|
|
|
2846
2896
|
var tmp$ret$3 = new Square_0(item_0.m2_1, item_0.l2_1);
|
|
2847
2897
|
destination_0.k(tmp$ret$3);
|
|
2848
2898
|
}
|
|
2849
|
-
tmp_0.
|
|
2899
|
+
tmp_0.ws_1 = destination_0;
|
|
2850
2900
|
var tmp_1 = this;
|
|
2851
2901
|
// Inline function 'kotlin.collections.associate' call
|
|
2852
2902
|
var this_2 = get_entries_2();
|
|
@@ -2860,19 +2910,19 @@ class Companion_11 {
|
|
|
2860
2910
|
var pair = to(element.l2_1, new Square_0(element.m2_1, element.l2_1));
|
|
2861
2911
|
destination_1.f5(pair.md_1, pair.nd_1);
|
|
2862
2912
|
}
|
|
2863
|
-
tmp_1.
|
|
2913
|
+
tmp_1.xs_1 = destination_1;
|
|
2864
2914
|
}
|
|
2865
2915
|
k2() {
|
|
2866
2916
|
return this.entries;
|
|
2867
2917
|
}
|
|
2868
|
-
|
|
2869
|
-
return this.
|
|
2918
|
+
es() {
|
|
2919
|
+
return this.ws_1;
|
|
2870
2920
|
}
|
|
2871
2921
|
get(name) {
|
|
2872
|
-
return this.
|
|
2922
|
+
return this.xs_1.j2(name);
|
|
2873
2923
|
}
|
|
2874
2924
|
indexToSquare(index) {
|
|
2875
|
-
return this.
|
|
2925
|
+
return this.ws_1.c1(index);
|
|
2876
2926
|
}
|
|
2877
2927
|
}
|
|
2878
2928
|
class Square_0 {
|
|
@@ -2881,10 +2931,10 @@ class Square_0 {
|
|
|
2881
2931
|
this.ordinal = ordinal;
|
|
2882
2932
|
this.name = name;
|
|
2883
2933
|
}
|
|
2884
|
-
|
|
2934
|
+
fs() {
|
|
2885
2935
|
return this.ordinal;
|
|
2886
2936
|
}
|
|
2887
|
-
|
|
2937
|
+
cr() {
|
|
2888
2938
|
return this.name;
|
|
2889
2939
|
}
|
|
2890
2940
|
getCol() {
|
|
@@ -3105,7 +3155,7 @@ function toString_3($this, tabulation) {
|
|
|
3105
3155
|
sb.za(p.uj().lj_1).j8('...');
|
|
3106
3156
|
}
|
|
3107
3157
|
}
|
|
3108
|
-
sb.j8(
|
|
3158
|
+
sb.j8(toSan_0(p.uj(), $this.oi_1)).j8(' ');
|
|
3109
3159
|
var tmp6_safe_receiver = $this.si_1;
|
|
3110
3160
|
if (tmp6_safe_receiver == null)
|
|
3111
3161
|
null;
|
|
@@ -3403,35 +3453,35 @@ function Result_DRAW_getInstance() {
|
|
|
3403
3453
|
return Result_DRAW_instance;
|
|
3404
3454
|
}
|
|
3405
3455
|
function *_generator_invoke__zhh2q8($this, $this$sequence, $completion) {
|
|
3406
|
-
var tmp = $this$sequence.wd($this.
|
|
3456
|
+
var tmp = $this$sequence.wd($this.um_1.fn(), $completion);
|
|
3407
3457
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
3408
3458
|
tmp = yield tmp;
|
|
3409
|
-
var tmp_0 = $this$sequence.wd($this.
|
|
3459
|
+
var tmp_0 = $this$sequence.wd($this.um_1.gn(), $completion);
|
|
3410
3460
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
3411
3461
|
tmp_0 = yield tmp_0;
|
|
3412
3462
|
return Unit_instance;
|
|
3413
3463
|
}
|
|
3414
3464
|
function KingMoves$regularMovesList$delegate$lambda$lambda(this$0) {
|
|
3415
|
-
return (it) => this$0.
|
|
3465
|
+
return (it) => this$0.an_1(this$0.wm_1, countTrailingZeroBits(it));
|
|
3416
3466
|
}
|
|
3417
3467
|
function KingMoves$regularMovesList$delegate$lambda(this$0) {
|
|
3418
|
-
return () => bitboardToList(this$0.
|
|
3468
|
+
return () => bitboardToList(this$0.ym_1, KingMoves$regularMovesList$delegate$lambda$lambda(this$0));
|
|
3419
3469
|
}
|
|
3420
3470
|
function KingMoves$_get_regularMovesList_$ref_1r6ljl() {
|
|
3421
|
-
return (p0) => p0.
|
|
3471
|
+
return (p0) => p0.fn();
|
|
3422
3472
|
}
|
|
3423
3473
|
function KingMoves$castleMovesList$delegate$lambda$lambda(this$0) {
|
|
3424
|
-
return (it) => this$0.
|
|
3474
|
+
return (it) => this$0.an_1(this$0.wm_1, countTrailingZeroBits(it));
|
|
3425
3475
|
}
|
|
3426
3476
|
function KingMoves$castleMovesList$delegate$lambda(this$0) {
|
|
3427
|
-
return () => bitboardToList(this$0.
|
|
3477
|
+
return () => bitboardToList(this$0.zm_1, KingMoves$castleMovesList$delegate$lambda$lambda(this$0));
|
|
3428
3478
|
}
|
|
3429
3479
|
function KingMoves$_get_castleMovesList_$ref_3suu4f() {
|
|
3430
|
-
return (p0) => p0.
|
|
3480
|
+
return (p0) => p0.gn();
|
|
3431
3481
|
}
|
|
3432
3482
|
function KingMoves$allMovesList$delegate$lambda$slambda_0(this$0) {
|
|
3433
3483
|
var i = new KingMoves$allMovesList$delegate$lambda$slambda(this$0);
|
|
3434
|
-
var l = ($this$sequence, $completion) => i.
|
|
3484
|
+
var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
|
|
3435
3485
|
l.$arity = 1;
|
|
3436
3486
|
return l;
|
|
3437
3487
|
}
|
|
@@ -3439,7 +3489,7 @@ function KingMoves$allMovesList$delegate$lambda(this$0) {
|
|
|
3439
3489
|
return () => toList(sequence(KingMoves$allMovesList$delegate$lambda$slambda_0(this$0)));
|
|
3440
3490
|
}
|
|
3441
3491
|
function KingMoves$_get_allMovesList_$ref_go3t84() {
|
|
3442
|
-
return (p0) => p0.
|
|
3492
|
+
return (p0) => p0.in();
|
|
3443
3493
|
}
|
|
3444
3494
|
var Level_TRACE_instance;
|
|
3445
3495
|
var Level_DEBUG_instance;
|
|
@@ -3519,67 +3569,67 @@ function init_io_github_lunalobos_chess4kt_Move(_this__u8e3s4) {
|
|
|
3519
3569
|
Companion_getInstance_2();
|
|
3520
3570
|
}
|
|
3521
3571
|
function init_io_github_lunalobos_chess4kt_MoveException(_this__u8e3s4) {
|
|
3522
|
-
captureStack(_this__u8e3s4, _this__u8e3s4.
|
|
3572
|
+
captureStack(_this__u8e3s4, _this__u8e3s4.zn_1);
|
|
3523
3573
|
}
|
|
3524
3574
|
function *_generator_invoke__zhh2q8_0($this, $this$sequence, $completion) {
|
|
3525
|
-
var tmp = asSequence($this.
|
|
3575
|
+
var tmp = asSequence($this.jo_1.bo_1);
|
|
3526
3576
|
var tmp_0 = $this$sequence.xd(flatMap(tmp, MovesInfo$movesList$delegate$lambda$slambda$lambda), $completion);
|
|
3527
3577
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
3528
3578
|
tmp_0 = yield tmp_0;
|
|
3529
|
-
var tmp_1 = asSequence($this.
|
|
3579
|
+
var tmp_1 = asSequence($this.jo_1.co_1);
|
|
3530
3580
|
var tmp_2 = $this$sequence.xd(flatMap(tmp_1, MovesInfo$movesList$delegate$lambda$slambda$lambda_0), $completion);
|
|
3531
3581
|
if (tmp_2 === get_COROUTINE_SUSPENDED())
|
|
3532
3582
|
tmp_2 = yield tmp_2;
|
|
3533
|
-
var tmp_3 = asSequence($this.
|
|
3583
|
+
var tmp_3 = asSequence($this.jo_1.do_1);
|
|
3534
3584
|
var tmp_4 = $this$sequence.xd(flatMap(tmp_3, MovesInfo$movesList$delegate$lambda$slambda$lambda_1), $completion);
|
|
3535
3585
|
if (tmp_4 === get_COROUTINE_SUSPENDED())
|
|
3536
3586
|
tmp_4 = yield tmp_4;
|
|
3537
|
-
var tmp_5 = asSequence($this.
|
|
3587
|
+
var tmp_5 = asSequence($this.jo_1.eo_1);
|
|
3538
3588
|
var tmp_6 = $this$sequence.xd(flatMap(tmp_5, MovesInfo$movesList$delegate$lambda$slambda$lambda_2), $completion);
|
|
3539
3589
|
if (tmp_6 === get_COROUTINE_SUSPENDED())
|
|
3540
3590
|
tmp_6 = yield tmp_6;
|
|
3541
|
-
var tmp_7 = asSequence($this.
|
|
3591
|
+
var tmp_7 = asSequence($this.jo_1.fo_1);
|
|
3542
3592
|
var tmp_8 = $this$sequence.xd(flatMap(tmp_7, MovesInfo$movesList$delegate$lambda$slambda$lambda_3), $completion);
|
|
3543
3593
|
if (tmp_8 === get_COROUTINE_SUSPENDED())
|
|
3544
3594
|
tmp_8 = yield tmp_8;
|
|
3545
|
-
var tmp_9 = $this$sequence.xd(asSequence($this.
|
|
3595
|
+
var tmp_9 = $this$sequence.xd(asSequence($this.jo_1.go_1.in()), $completion);
|
|
3546
3596
|
if (tmp_9 === get_COROUTINE_SUSPENDED())
|
|
3547
3597
|
tmp_9 = yield tmp_9;
|
|
3548
3598
|
return Unit_instance;
|
|
3549
3599
|
}
|
|
3550
3600
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda(it) {
|
|
3551
|
-
return asSequence(it.
|
|
3601
|
+
return asSequence(it.in());
|
|
3552
3602
|
}
|
|
3553
3603
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_0(it) {
|
|
3554
|
-
return asSequence(it.
|
|
3604
|
+
return asSequence(it.in());
|
|
3555
3605
|
}
|
|
3556
3606
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_1(it) {
|
|
3557
|
-
return asSequence(it.
|
|
3607
|
+
return asSequence(it.in());
|
|
3558
3608
|
}
|
|
3559
3609
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_2(it) {
|
|
3560
|
-
return asSequence(it.
|
|
3610
|
+
return asSequence(it.in());
|
|
3561
3611
|
}
|
|
3562
3612
|
function MovesInfo$movesList$delegate$lambda$slambda$lambda_3(it) {
|
|
3563
|
-
return asSequence(it.
|
|
3613
|
+
return asSequence(it.in());
|
|
3564
3614
|
}
|
|
3565
3615
|
function MovesInfo$moves$delegate$lambda$lambda(it) {
|
|
3566
|
-
return it.
|
|
3616
|
+
return it.xo_1;
|
|
3567
3617
|
}
|
|
3568
3618
|
function MovesInfo$moves$delegate$lambda$lambda_0(it) {
|
|
3569
|
-
return it.
|
|
3619
|
+
return it.cp_1;
|
|
3570
3620
|
}
|
|
3571
3621
|
function MovesInfo$moves$delegate$lambda$lambda_1(it) {
|
|
3572
|
-
return it.
|
|
3622
|
+
return it.cp_1;
|
|
3573
3623
|
}
|
|
3574
3624
|
function MovesInfo$moves$delegate$lambda$lambda_2(it) {
|
|
3575
|
-
return it.
|
|
3625
|
+
return it.cp_1;
|
|
3576
3626
|
}
|
|
3577
3627
|
function MovesInfo$moves$delegate$lambda$lambda_3(it) {
|
|
3578
|
-
return it.
|
|
3628
|
+
return it.cp_1;
|
|
3579
3629
|
}
|
|
3580
3630
|
function MovesInfo$moves$delegate$lambda(this$0) {
|
|
3581
3631
|
return () => {
|
|
3582
|
-
var tmp = asSequence(this$0.
|
|
3632
|
+
var tmp = asSequence(this$0.bo_1);
|
|
3583
3633
|
// Inline function 'kotlin.sequences.fold' call
|
|
3584
3634
|
var accumulator = 0n;
|
|
3585
3635
|
var _iterator__ex2g4s = map(tmp, MovesInfo$moves$delegate$lambda$lambda).x();
|
|
@@ -3588,7 +3638,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3588
3638
|
accumulator = accumulator | element;
|
|
3589
3639
|
}
|
|
3590
3640
|
var pm = accumulator;
|
|
3591
|
-
var tmp_0 = asSequence(this$0.
|
|
3641
|
+
var tmp_0 = asSequence(this$0.co_1);
|
|
3592
3642
|
// Inline function 'kotlin.sequences.fold' call
|
|
3593
3643
|
var accumulator_0 = 0n;
|
|
3594
3644
|
var _iterator__ex2g4s_0 = map(tmp_0, MovesInfo$moves$delegate$lambda$lambda_0).x();
|
|
@@ -3597,7 +3647,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3597
3647
|
accumulator_0 = accumulator_0 | element_0;
|
|
3598
3648
|
}
|
|
3599
3649
|
var nm = accumulator_0;
|
|
3600
|
-
var tmp_1 = asSequence(this$0.
|
|
3650
|
+
var tmp_1 = asSequence(this$0.do_1);
|
|
3601
3651
|
// Inline function 'kotlin.sequences.fold' call
|
|
3602
3652
|
var accumulator_1 = 0n;
|
|
3603
3653
|
var _iterator__ex2g4s_1 = map(tmp_1, MovesInfo$moves$delegate$lambda$lambda_1).x();
|
|
@@ -3606,7 +3656,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3606
3656
|
accumulator_1 = accumulator_1 | element_1;
|
|
3607
3657
|
}
|
|
3608
3658
|
var bm = accumulator_1;
|
|
3609
|
-
var tmp_2 = asSequence(this$0.
|
|
3659
|
+
var tmp_2 = asSequence(this$0.eo_1);
|
|
3610
3660
|
// Inline function 'kotlin.sequences.fold' call
|
|
3611
3661
|
var accumulator_2 = 0n;
|
|
3612
3662
|
var _iterator__ex2g4s_2 = map(tmp_2, MovesInfo$moves$delegate$lambda$lambda_2).x();
|
|
@@ -3615,7 +3665,7 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3615
3665
|
accumulator_2 = accumulator_2 | element_2;
|
|
3616
3666
|
}
|
|
3617
3667
|
var rm = accumulator_2;
|
|
3618
|
-
var tmp_3 = asSequence(this$0.
|
|
3668
|
+
var tmp_3 = asSequence(this$0.fo_1);
|
|
3619
3669
|
// Inline function 'kotlin.sequences.fold' call
|
|
3620
3670
|
var accumulator_3 = 0n;
|
|
3621
3671
|
var _iterator__ex2g4s_3 = map(tmp_3, MovesInfo$moves$delegate$lambda$lambda_3).x();
|
|
@@ -3624,16 +3674,16 @@ function MovesInfo$moves$delegate$lambda(this$0) {
|
|
|
3624
3674
|
accumulator_3 = accumulator_3 | element_3;
|
|
3625
3675
|
}
|
|
3626
3676
|
var qm = accumulator_3;
|
|
3627
|
-
var km = this$0.
|
|
3677
|
+
var km = this$0.go_1.dn_1;
|
|
3628
3678
|
return pm | nm | bm | rm | qm | km;
|
|
3629
3679
|
};
|
|
3630
3680
|
}
|
|
3631
3681
|
function MovesInfo$_get_moves_$ref_54hm5y() {
|
|
3632
|
-
return (p0) => p0.
|
|
3682
|
+
return (p0) => p0.fp();
|
|
3633
3683
|
}
|
|
3634
3684
|
function MovesInfo$movesList$delegate$lambda$slambda_0(this$0) {
|
|
3635
3685
|
var i = new MovesInfo$movesList$delegate$lambda$slambda(this$0);
|
|
3636
|
-
var l = ($this$sequence, $completion) => i.
|
|
3686
|
+
var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
|
|
3637
3687
|
l.$arity = 1;
|
|
3638
3688
|
return l;
|
|
3639
3689
|
}
|
|
@@ -3641,7 +3691,7 @@ function MovesInfo$movesList$delegate$lambda(this$0) {
|
|
|
3641
3691
|
return () => toList(sequence(MovesInfo$movesList$delegate$lambda$slambda_0(this$0)));
|
|
3642
3692
|
}
|
|
3643
3693
|
function MovesInfo$_get_movesList_$ref_o79khg() {
|
|
3644
|
-
return (p0) => p0.
|
|
3694
|
+
return (p0) => p0.gp();
|
|
3645
3695
|
}
|
|
3646
3696
|
var Notation_UCI_instance;
|
|
3647
3697
|
var Notation_SAN_instance;
|
|
@@ -3689,30 +3739,30 @@ function Companion_getInstance_3() {
|
|
|
3689
3739
|
return Companion_instance_3;
|
|
3690
3740
|
}
|
|
3691
3741
|
function parseGame($this, idSupplier) {
|
|
3692
|
-
if (!$this.
|
|
3693
|
-
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)));
|
|
3694
3744
|
}
|
|
3695
|
-
while ($this.
|
|
3745
|
+
while ($this.qp_1.mp_1.equals(TokenType_LBRACKET_getInstance())) {
|
|
3696
3746
|
parseTag($this);
|
|
3697
3747
|
}
|
|
3698
|
-
$this.
|
|
3699
|
-
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;
|
|
3700
3750
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wj_1;
|
|
3701
3751
|
var tmp;
|
|
3702
3752
|
if (tmp1_elvis_lhs == null) {
|
|
3703
|
-
throw Companion_getInstance_3().
|
|
3753
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp("current game can't be null"));
|
|
3704
3754
|
} else {
|
|
3705
3755
|
tmp = tmp1_elvis_lhs;
|
|
3706
3756
|
}
|
|
3707
3757
|
parseMoves($this, tmp);
|
|
3708
|
-
if ($this.
|
|
3709
|
-
var tmp2_safe_receiver = $this.
|
|
3758
|
+
if ($this.qp_1.mp_1.equals(TokenType_RESULT_getInstance())) {
|
|
3759
|
+
var tmp2_safe_receiver = $this.sp_1;
|
|
3710
3760
|
if (tmp2_safe_receiver == null)
|
|
3711
3761
|
null;
|
|
3712
3762
|
else {
|
|
3713
3763
|
// Inline function 'kotlin.apply' call
|
|
3714
3764
|
var tmp_0;
|
|
3715
|
-
switch ($this.
|
|
3765
|
+
switch ($this.qp_1.np_1) {
|
|
3716
3766
|
case '1-0':
|
|
3717
3767
|
tmp_0 = Result_WHITE_WIN_getInstance();
|
|
3718
3768
|
break;
|
|
@@ -3723,80 +3773,80 @@ function parseGame($this, idSupplier) {
|
|
|
3723
3773
|
tmp_0 = Result_DRAW_getInstance();
|
|
3724
3774
|
break;
|
|
3725
3775
|
default:
|
|
3726
|
-
throw Companion_getInstance_3().
|
|
3776
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedPgn($this)));
|
|
3727
3777
|
}
|
|
3728
|
-
tmp2_safe_receiver.
|
|
3778
|
+
tmp2_safe_receiver.nm(tmp_0);
|
|
3729
3779
|
}
|
|
3730
|
-
} else if ($this.
|
|
3731
|
-
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;
|
|
3732
3782
|
if (tmp3_safe_receiver == null)
|
|
3733
3783
|
null;
|
|
3734
3784
|
else {
|
|
3735
3785
|
// Inline function 'kotlin.apply' call
|
|
3736
|
-
tmp3_safe_receiver.
|
|
3786
|
+
tmp3_safe_receiver.nm(null);
|
|
3737
3787
|
}
|
|
3738
3788
|
}
|
|
3739
|
-
var tmp4_safe_receiver = $this.
|
|
3789
|
+
var tmp4_safe_receiver = $this.sp_1;
|
|
3740
3790
|
if (tmp4_safe_receiver == null)
|
|
3741
3791
|
null;
|
|
3742
3792
|
else {
|
|
3743
3793
|
// Inline function 'kotlin.let' call
|
|
3744
|
-
tmp4_safe_receiver.
|
|
3745
|
-
$this.
|
|
3794
|
+
tmp4_safe_receiver.tl();
|
|
3795
|
+
$this.up_1.k(tmp4_safe_receiver);
|
|
3746
3796
|
}
|
|
3747
3797
|
reset($this);
|
|
3748
3798
|
}
|
|
3749
3799
|
function reset($this) {
|
|
3750
|
-
$this.
|
|
3800
|
+
$this.sp_1 = null;
|
|
3751
3801
|
var tmp = $this;
|
|
3752
3802
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
3753
|
-
tmp.
|
|
3803
|
+
tmp.rp_1 = LinkedHashMap.v8();
|
|
3754
3804
|
}
|
|
3755
3805
|
function malformedPgn($this) {
|
|
3756
|
-
return 'malformed pgn at line ' + $this.
|
|
3806
|
+
return 'malformed pgn at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.np_1;
|
|
3757
3807
|
}
|
|
3758
3808
|
function nextTokenOrFail($this, failMsg) {
|
|
3759
3809
|
var tmp;
|
|
3760
|
-
if ($this.
|
|
3761
|
-
tmp = $this.
|
|
3810
|
+
if ($this.tp_1.z()) {
|
|
3811
|
+
tmp = $this.tp_1.a1();
|
|
3762
3812
|
} else {
|
|
3763
|
-
throw Companion_getInstance_3().
|
|
3813
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(failMsg));
|
|
3764
3814
|
}
|
|
3765
3815
|
return tmp;
|
|
3766
3816
|
}
|
|
3767
3817
|
function malformedTag($this) {
|
|
3768
|
-
return 'malformed tag at line ' + $this.
|
|
3818
|
+
return 'malformed tag at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.np_1;
|
|
3769
3819
|
}
|
|
3770
3820
|
function parseTag($this) {
|
|
3771
|
-
$this.
|
|
3772
|
-
if (!$this.
|
|
3773
|
-
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)));
|
|
3774
3824
|
}
|
|
3775
3825
|
// Inline function 'kotlin.text.lowercase' call
|
|
3776
3826
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3777
|
-
var tagName = $this.
|
|
3827
|
+
var tagName = $this.qp_1.np_1.toLowerCase();
|
|
3778
3828
|
if (tagName === 'eco') {
|
|
3779
3829
|
tagName = 'ECO';
|
|
3780
3830
|
}
|
|
3781
|
-
$this.
|
|
3782
|
-
if (!$this.
|
|
3783
|
-
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)));
|
|
3784
3834
|
}
|
|
3785
|
-
var tagValue = $this.
|
|
3786
|
-
var tmp0 = $this.
|
|
3835
|
+
var tagValue = $this.qp_1.np_1;
|
|
3836
|
+
var tmp0 = $this.rp_1;
|
|
3787
3837
|
// Inline function 'kotlin.collections.set' call
|
|
3788
3838
|
var key = tagName;
|
|
3789
3839
|
tmp0.f5(key, tagValue);
|
|
3790
|
-
$this.
|
|
3791
|
-
if ($this.
|
|
3792
|
-
$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));
|
|
3793
3843
|
return Unit_instance;
|
|
3794
3844
|
} else {
|
|
3795
|
-
throw Companion_getInstance_3().
|
|
3845
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedTag($this)));
|
|
3796
3846
|
}
|
|
3797
3847
|
}
|
|
3798
3848
|
function malformedMoveText($this) {
|
|
3799
|
-
return 'malformed move text at line ' + $this.
|
|
3849
|
+
return 'malformed move text at line ' + $this.qp_1.op_1 + ' token ' + $this.qp_1.toString();
|
|
3800
3850
|
}
|
|
3801
3851
|
function parseMoves($this, node) {
|
|
3802
3852
|
var move = null;
|
|
@@ -3805,12 +3855,12 @@ function parseMoves($this, node) {
|
|
|
3805
3855
|
var endLineComment = null;
|
|
3806
3856
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3807
3857
|
var suffixAnnotations = ArrayList.h1();
|
|
3808
|
-
if ($this.
|
|
3809
|
-
$this.
|
|
3858
|
+
if ($this.qp_1.mp_1.equals(TokenType_LPAREN_getInstance())) {
|
|
3859
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3810
3860
|
var tmp0_elvis_lhs = node.aj();
|
|
3811
3861
|
var tmp;
|
|
3812
3862
|
if (tmp0_elvis_lhs == null) {
|
|
3813
|
-
throw Companion_getInstance_3().
|
|
3863
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp('node ' + toString_0(node.rk()) + ' has no parent'));
|
|
3814
3864
|
} else {
|
|
3815
3865
|
tmp = tmp0_elvis_lhs;
|
|
3816
3866
|
}
|
|
@@ -3818,45 +3868,45 @@ function parseMoves($this, node) {
|
|
|
3818
3868
|
}
|
|
3819
3869
|
while (move == null) {
|
|
3820
3870
|
var tokenCounter = 0;
|
|
3821
|
-
switch ($this.
|
|
3871
|
+
switch ($this.qp_1.mp_1.m2_1) {
|
|
3822
3872
|
case 10:
|
|
3823
3873
|
break;
|
|
3824
3874
|
case 4:
|
|
3825
3875
|
break;
|
|
3826
3876
|
case 11:
|
|
3827
|
-
initialComment = $this.
|
|
3877
|
+
initialComment = $this.qp_1.np_1;
|
|
3828
3878
|
break;
|
|
3829
3879
|
case 9:
|
|
3830
|
-
move = $this.
|
|
3880
|
+
move = $this.qp_1.np_1;
|
|
3831
3881
|
break;
|
|
3832
3882
|
default:
|
|
3833
|
-
throw Companion_getInstance_3().
|
|
3883
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3834
3884
|
}
|
|
3835
|
-
$this.
|
|
3885
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3836
3886
|
tokenCounter = tokenCounter + 1 | 0;
|
|
3837
3887
|
if (tokenCounter > 10) {
|
|
3838
|
-
throw Companion_getInstance_3().
|
|
3888
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3839
3889
|
}
|
|
3840
3890
|
}
|
|
3841
|
-
$l$loop_0: while (!$this.
|
|
3842
|
-
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) {
|
|
3843
3893
|
case 11:
|
|
3844
|
-
comment = $this.
|
|
3894
|
+
comment = $this.qp_1.np_1;
|
|
3845
3895
|
break;
|
|
3846
3896
|
case 12:
|
|
3847
|
-
endLineComment = $this.
|
|
3897
|
+
endLineComment = $this.qp_1.np_1;
|
|
3848
3898
|
break;
|
|
3849
3899
|
case 5:
|
|
3850
|
-
suffixAnnotations.k(toInt($this.
|
|
3900
|
+
suffixAnnotations.k(toInt($this.qp_1.np_1));
|
|
3851
3901
|
break;
|
|
3852
3902
|
case 2:
|
|
3853
3903
|
break $l$loop_0;
|
|
3854
3904
|
case 3:
|
|
3855
3905
|
break $l$loop_0;
|
|
3856
3906
|
default:
|
|
3857
|
-
throw Companion_getInstance_3().
|
|
3907
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3858
3908
|
}
|
|
3859
|
-
$this.
|
|
3909
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3860
3910
|
}
|
|
3861
3911
|
var tmp_0 = move;
|
|
3862
3912
|
var tmp_1 = initialComment;
|
|
@@ -3872,7 +3922,7 @@ function parseMoves($this, node) {
|
|
|
3872
3922
|
var tmp$ret$2 = tmp_4;
|
|
3873
3923
|
var nextNode = node.wk(tmp_0, tmp_1, tmp_2, tmp_3, tmp$ret$2);
|
|
3874
3924
|
var tmp_5;
|
|
3875
|
-
switch ($this.
|
|
3925
|
+
switch ($this.qp_1.mp_1.m2_1) {
|
|
3876
3926
|
case 10:
|
|
3877
3927
|
tmp_5 = parseMoves($this, nextNode);
|
|
3878
3928
|
break;
|
|
@@ -3880,12 +3930,12 @@ function parseMoves($this, node) {
|
|
|
3880
3930
|
tmp_5 = parseMoves($this, nextNode);
|
|
3881
3931
|
break;
|
|
3882
3932
|
case 2:
|
|
3883
|
-
$this.
|
|
3933
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3884
3934
|
parseMoves($this, node);
|
|
3885
3935
|
tmp_5 = parseMoves($this, nextNode);
|
|
3886
3936
|
break;
|
|
3887
3937
|
case 3:
|
|
3888
|
-
$this.
|
|
3938
|
+
$this.qp_1 = nextTokenOrFail($this, malformedMoveText($this));
|
|
3889
3939
|
return nextNode;
|
|
3890
3940
|
case 7:
|
|
3891
3941
|
tmp_5 = nextNode;
|
|
@@ -3894,21 +3944,21 @@ function parseMoves($this, node) {
|
|
|
3894
3944
|
tmp_5 = nextNode;
|
|
3895
3945
|
break;
|
|
3896
3946
|
default:
|
|
3897
|
-
throw Companion_getInstance_3().
|
|
3947
|
+
throw Companion_getInstance_3().hp_1.yl(ParserException.lp(malformedMoveText($this)));
|
|
3898
3948
|
}
|
|
3899
3949
|
return tmp_5;
|
|
3900
3950
|
}
|
|
3901
3951
|
function *_generator_invoke__zhh2q8_1($this, $this$sequence, $completion) {
|
|
3902
|
-
var tmp = $this$sequence.wd($this.
|
|
3952
|
+
var tmp = $this$sequence.wd($this.wp_1.fn(), $completion);
|
|
3903
3953
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
3904
3954
|
tmp = yield tmp;
|
|
3905
|
-
var tmp_0 = $this$sequence.wd($this.
|
|
3955
|
+
var tmp_0 = $this$sequence.wd($this.wp_1.xp(), $completion);
|
|
3906
3956
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
3907
3957
|
tmp_0 = yield tmp_0;
|
|
3908
|
-
var tmp_1 = $this$sequence.wd($this.
|
|
3958
|
+
var tmp_1 = $this$sequence.wd($this.wp_1.yp(), $completion);
|
|
3909
3959
|
if (tmp_1 === get_COROUTINE_SUSPENDED())
|
|
3910
3960
|
tmp_1 = yield tmp_1;
|
|
3911
|
-
var tmp0_safe_receiver = $this.
|
|
3961
|
+
var tmp0_safe_receiver = $this.wp_1.zp();
|
|
3912
3962
|
if (tmp0_safe_receiver == null)
|
|
3913
3963
|
null;
|
|
3914
3964
|
else {
|
|
@@ -3920,47 +3970,47 @@ function *_generator_invoke__zhh2q8_1($this, $this$sequence, $completion) {
|
|
|
3920
3970
|
return Unit_instance;
|
|
3921
3971
|
}
|
|
3922
3972
|
function PawnMoves$regularMovesList$delegate$lambda$lambda(this$0) {
|
|
3923
|
-
return (it) => this$0.
|
|
3973
|
+
return (it) => this$0.ro_1(this$0.lo_1, countTrailingZeroBits(it));
|
|
3924
3974
|
}
|
|
3925
3975
|
function PawnMoves$regularMovesList$delegate$lambda(this$0) {
|
|
3926
|
-
return () => bitboardToList(this$0.
|
|
3976
|
+
return () => bitboardToList(this$0.no_1, PawnMoves$regularMovesList$delegate$lambda$lambda(this$0));
|
|
3927
3977
|
}
|
|
3928
3978
|
function PawnMoves$_get_regularMovesList_$ref_qve2sg() {
|
|
3929
|
-
return (p0) => p0.
|
|
3979
|
+
return (p0) => p0.fn();
|
|
3930
3980
|
}
|
|
3931
3981
|
function PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0) {
|
|
3932
|
-
return (it) => this$0.
|
|
3982
|
+
return (it) => this$0.ro_1(this$0.lo_1, countTrailingZeroBits(it));
|
|
3933
3983
|
}
|
|
3934
3984
|
function PawnMoves$advanceEpMovesList$delegate$lambda(this$0) {
|
|
3935
|
-
return () => bitboardToList(this$0.
|
|
3985
|
+
return () => bitboardToList(this$0.oo_1, PawnMoves$advanceEpMovesList$delegate$lambda$lambda(this$0));
|
|
3936
3986
|
}
|
|
3937
3987
|
function PawnMoves$_get_advanceEpMovesList_$ref_k5ega7() {
|
|
3938
|
-
return (p0) => p0.
|
|
3988
|
+
return (p0) => p0.xp();
|
|
3939
3989
|
}
|
|
3940
3990
|
function PawnMoves$promotionMovesList$delegate$lambda$lambda$lambda(this$0, $move) {
|
|
3941
|
-
return (it) => this$0.
|
|
3991
|
+
return (it) => this$0.so_1(this$0.lo_1, countTrailingZeroBits($move), it.m2_1);
|
|
3942
3992
|
}
|
|
3943
3993
|
function PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0) {
|
|
3944
3994
|
return (move) => {
|
|
3945
|
-
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()]);
|
|
3946
3996
|
return toList(map(tmp, PawnMoves$promotionMovesList$delegate$lambda$lambda$lambda(this$0, move)));
|
|
3947
3997
|
};
|
|
3948
3998
|
}
|
|
3949
3999
|
function PawnMoves$promotionMovesList$delegate$lambda(this$0) {
|
|
3950
|
-
return () => bitboardToCollectedList(this$0.
|
|
4000
|
+
return () => bitboardToCollectedList(this$0.po_1, PawnMoves$promotionMovesList$delegate$lambda$lambda(this$0));
|
|
3951
4001
|
}
|
|
3952
4002
|
function PawnMoves$_get_promotionMovesList_$ref_pb8487() {
|
|
3953
|
-
return (p0) => p0.
|
|
4003
|
+
return (p0) => p0.yp();
|
|
3954
4004
|
}
|
|
3955
4005
|
function PawnMoves$epCaptureMove$delegate$lambda(this$0) {
|
|
3956
|
-
return () => !(this$0.
|
|
4006
|
+
return () => !(this$0.qo_1 === 0n) ? moveOf(this$0.lo_1, countTrailingZeroBits(this$0.qo_1)) : null;
|
|
3957
4007
|
}
|
|
3958
4008
|
function PawnMoves$_get_epCaptureMove_$ref_4vz7gq() {
|
|
3959
|
-
return (p0) => p0.
|
|
4009
|
+
return (p0) => p0.zp();
|
|
3960
4010
|
}
|
|
3961
4011
|
function PawnMoves$allMovesList$delegate$lambda$slambda_0(this$0) {
|
|
3962
4012
|
var i = new PawnMoves$allMovesList$delegate$lambda$slambda(this$0);
|
|
3963
|
-
var l = ($this$sequence, $completion) => i.
|
|
4013
|
+
var l = ($this$sequence, $completion) => i.hn($this$sequence, $completion);
|
|
3964
4014
|
l.$arity = 1;
|
|
3965
4015
|
return l;
|
|
3966
4016
|
}
|
|
@@ -3968,7 +4018,7 @@ function PawnMoves$allMovesList$delegate$lambda(this$0) {
|
|
|
3968
4018
|
return () => toList(sequence(PawnMoves$allMovesList$delegate$lambda$slambda_0(this$0)));
|
|
3969
4019
|
}
|
|
3970
4020
|
function PawnMoves$_get_allMovesList_$ref_s0vg9x() {
|
|
3971
|
-
return (p0) => p0.
|
|
4021
|
+
return (p0) => p0.in();
|
|
3972
4022
|
}
|
|
3973
4023
|
var Piece_EMPTY_instance;
|
|
3974
4024
|
var Piece_WP_instance;
|
|
@@ -4115,46 +4165,46 @@ function _get_moves__e5my0h($this) {
|
|
|
4115
4165
|
return tmp0.h2();
|
|
4116
4166
|
}
|
|
4117
4167
|
function Position$moves$delegate$lambda(this$0) {
|
|
4118
|
-
return () => this$0.
|
|
4168
|
+
return () => this$0.eq().fp();
|
|
4119
4169
|
}
|
|
4120
4170
|
function Position$_get_moves_$ref_1wr6hp() {
|
|
4121
4171
|
return (p0) => _get_moves__e5my0h(p0);
|
|
4122
4172
|
}
|
|
4123
4173
|
function Position$check$delegate$lambda(this$0) {
|
|
4124
|
-
return () => inCheck(this$0.
|
|
4174
|
+
return () => inCheck(this$0.fq(), this$0.fj_1);
|
|
4125
4175
|
}
|
|
4126
4176
|
function Position$_get_check_$ref_tp97h() {
|
|
4127
|
-
return (p0) => p0.
|
|
4177
|
+
return (p0) => p0.gq();
|
|
4128
4178
|
}
|
|
4129
4179
|
function Position$checkmate$delegate$lambda(this$0) {
|
|
4130
|
-
return () => isCheckmate(this$0.
|
|
4180
|
+
return () => isCheckmate(this$0.fq(), this$0.fj_1, _get_moves__e5my0h(this$0));
|
|
4131
4181
|
}
|
|
4132
4182
|
function Position$_get_checkmate_$ref_mwt4hk() {
|
|
4133
|
-
return (p0) => p0.
|
|
4183
|
+
return (p0) => p0.hq();
|
|
4134
4184
|
}
|
|
4135
4185
|
function Position$stalemate$delegate$lambda(this$0) {
|
|
4136
|
-
return () => isStalemate(this$0.
|
|
4186
|
+
return () => isStalemate(this$0.fq(), this$0.fj_1, _get_moves__e5my0h(this$0));
|
|
4137
4187
|
}
|
|
4138
4188
|
function Position$_get_stalemate_$ref_l6lqf() {
|
|
4139
|
-
return (p0) => p0.
|
|
4189
|
+
return (p0) => p0.iq();
|
|
4140
4190
|
}
|
|
4141
4191
|
function Position$lackOfMaterial$delegate$lambda(this$0) {
|
|
4142
|
-
return () => isLackOfMaterial(this$0.
|
|
4192
|
+
return () => isLackOfMaterial(this$0.fq());
|
|
4143
4193
|
}
|
|
4144
4194
|
function Position$_get_lackOfMaterial_$ref_whrjuu() {
|
|
4145
|
-
return (p0) => p0.
|
|
4195
|
+
return (p0) => p0.jq();
|
|
4146
4196
|
}
|
|
4147
4197
|
function Position$fiftyMoves$delegate$lambda(this$0) {
|
|
4148
4198
|
return () => this$0.mj_1 >= 50;
|
|
4149
4199
|
}
|
|
4150
4200
|
function Position$_get_fiftyMoves_$ref_ima66z() {
|
|
4151
|
-
return (p0) => p0.
|
|
4201
|
+
return (p0) => p0.sm();
|
|
4152
4202
|
}
|
|
4153
4203
|
function Position$zobrist$delegate$lambda(this$0) {
|
|
4154
|
-
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);
|
|
4155
4205
|
}
|
|
4156
4206
|
function Position$_get_zobrist_$ref_t8al0g() {
|
|
4157
|
-
return (p0) => p0.
|
|
4207
|
+
return (p0) => p0.kq();
|
|
4158
4208
|
}
|
|
4159
4209
|
function init_io_github_lunalobos_chess4kt_Position(_this__u8e3s4) {
|
|
4160
4210
|
Companion_getInstance_5();
|
|
@@ -4174,13 +4224,13 @@ function init_io_github_lunalobos_chess4kt_Position(_this__u8e3s4) {
|
|
|
4174
4224
|
tmp_5.tj_1 = lazy(Position$zobrist$delegate$lambda(_this__u8e3s4));
|
|
4175
4225
|
}
|
|
4176
4226
|
function RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0) {
|
|
4177
|
-
return (it) => this$0.
|
|
4227
|
+
return (it) => this$0.dp_1(this$0.ap_1, countTrailingZeroBits(it));
|
|
4178
4228
|
}
|
|
4179
4229
|
function RegularPieceMoves$allMovesList$delegate$lambda(this$0) {
|
|
4180
|
-
return () => bitboardToList(this$0.
|
|
4230
|
+
return () => bitboardToList(this$0.cp_1, RegularPieceMoves$allMovesList$delegate$lambda$lambda(this$0));
|
|
4181
4231
|
}
|
|
4182
4232
|
function RegularPieceMoves$_get_allMovesList_$ref_ts1d8v() {
|
|
4183
|
-
return (p0) => p0.
|
|
4233
|
+
return (p0) => p0.in();
|
|
4184
4234
|
}
|
|
4185
4235
|
var Side_WHITE_instance;
|
|
4186
4236
|
var Side_BLACK_instance;
|
|
@@ -4843,36 +4893,36 @@ function addToken($this, type, value) {
|
|
|
4843
4893
|
var tmp;
|
|
4844
4894
|
// Inline function 'kotlin.text.isEmpty' call
|
|
4845
4895
|
if (charSequenceLength(value) === 0) {
|
|
4846
|
-
tmp = toString_1(charCodeAt($this.
|
|
4896
|
+
tmp = toString_1(charCodeAt($this.qq_1, $this.rq_1));
|
|
4847
4897
|
} else {
|
|
4848
4898
|
tmp = value;
|
|
4849
4899
|
}
|
|
4850
4900
|
var tmp$ret$2 = tmp;
|
|
4851
|
-
$this.
|
|
4852
|
-
$this.
|
|
4901
|
+
$this.tq_1.k(new Token(type, tmp$ret$2, $this.sq_1));
|
|
4902
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4853
4903
|
}
|
|
4854
4904
|
function addToken$default($this, type, value, $super) {
|
|
4855
4905
|
value = value === VOID ? '' : value;
|
|
4856
4906
|
return addToken($this, type, value);
|
|
4857
4907
|
}
|
|
4858
4908
|
function consumeWhitespace($this) {
|
|
4859
|
-
while ($this.
|
|
4860
|
-
if (charCodeAt($this.
|
|
4861
|
-
$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;
|
|
4862
4912
|
}
|
|
4863
|
-
$this.
|
|
4913
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4864
4914
|
}
|
|
4865
4915
|
}
|
|
4866
4916
|
function consumeString($this) {
|
|
4867
|
-
$this.
|
|
4868
|
-
var start = $this.
|
|
4917
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4918
|
+
var start = $this.rq_1;
|
|
4869
4919
|
var value = '';
|
|
4870
|
-
while ($this.
|
|
4871
|
-
var char = charCodeAt($this.
|
|
4920
|
+
while ($this.rq_1 < $this.qq_1.length) {
|
|
4921
|
+
var char = charCodeAt($this.qq_1, $this.rq_1);
|
|
4872
4922
|
if (char === _Char___init__impl__6a9atx(34)) {
|
|
4873
|
-
value = substring_0($this.
|
|
4874
|
-
$this.
|
|
4875
|
-
$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));
|
|
4876
4926
|
return Unit_instance;
|
|
4877
4927
|
}
|
|
4878
4928
|
var tmp;
|
|
@@ -4884,76 +4934,76 @@ function consumeString($this) {
|
|
|
4884
4934
|
}
|
|
4885
4935
|
if (tmp) {
|
|
4886
4936
|
if (char === _Char___init__impl__6a9atx(10)) {
|
|
4887
|
-
$this.
|
|
4937
|
+
$this.sq_1 = $this.sq_1 + 1 | 0;
|
|
4888
4938
|
}
|
|
4889
4939
|
}
|
|
4890
|
-
$this.
|
|
4940
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4891
4941
|
}
|
|
4892
|
-
throw ParserException.
|
|
4942
|
+
throw ParserException.lp('Unclosed string literal.');
|
|
4893
4943
|
}
|
|
4894
4944
|
function consumeBraceComment($this) {
|
|
4895
|
-
var start = $this.
|
|
4896
|
-
$this.
|
|
4897
|
-
while ($this.
|
|
4898
|
-
if (charCodeAt($this.
|
|
4899
|
-
$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;
|
|
4900
4950
|
}
|
|
4901
|
-
$this.
|
|
4951
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4902
4952
|
}
|
|
4903
|
-
if ($this.
|
|
4904
|
-
$this.
|
|
4953
|
+
if ($this.rq_1 < $this.qq_1.length) {
|
|
4954
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4905
4955
|
}
|
|
4906
4956
|
var tmp = TokenType_COMMENT_getInstance();
|
|
4907
4957
|
// Inline function 'kotlin.text.trim' call
|
|
4908
|
-
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);
|
|
4909
4959
|
var tmp$ret$0 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
4910
|
-
$this.
|
|
4960
|
+
$this.tq_1.k(new Token(tmp, tmp$ret$0, $this.sq_1));
|
|
4911
4961
|
}
|
|
4912
4962
|
function consumeSemicolonComment($this) {
|
|
4913
|
-
var start = $this.
|
|
4914
|
-
while ($this.
|
|
4915
|
-
$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;
|
|
4916
4966
|
}
|
|
4917
4967
|
var tmp = TokenType_END_LINE_COMMENT_getInstance();
|
|
4918
4968
|
// Inline function 'kotlin.text.trim' call
|
|
4919
|
-
var this_0 = substring_0($this.
|
|
4969
|
+
var this_0 = substring_0($this.qq_1, start + 1 | 0, $this.rq_1 - 1 | 0);
|
|
4920
4970
|
var tmp$ret$0 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
4921
|
-
$this.
|
|
4971
|
+
$this.tq_1.k(new Token(tmp, tmp$ret$0, $this.sq_1));
|
|
4922
4972
|
}
|
|
4923
4973
|
function consumeNAG($this) {
|
|
4924
|
-
$this.
|
|
4925
|
-
var start = $this.
|
|
4926
|
-
while ($this.
|
|
4927
|
-
$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;
|
|
4928
4978
|
}
|
|
4929
|
-
$this.
|
|
4979
|
+
$this.tq_1.k(new Token(TokenType_NAG_getInstance(), substring_0($this.qq_1, start, $this.rq_1), $this.sq_1));
|
|
4930
4980
|
}
|
|
4931
4981
|
function consumeNumberOrSymbol($this) {
|
|
4932
|
-
var start = $this.
|
|
4933
|
-
var currentPos = $this.
|
|
4934
|
-
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))) {
|
|
4935
4985
|
currentPos = currentPos + 1 | 0;
|
|
4936
4986
|
}
|
|
4937
|
-
if (currentPos < $this.
|
|
4938
|
-
$this.
|
|
4939
|
-
$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));
|
|
4940
4990
|
} else {
|
|
4941
|
-
$this.
|
|
4991
|
+
$this.rq_1 = start;
|
|
4942
4992
|
consumeSymbol($this);
|
|
4943
4993
|
}
|
|
4944
4994
|
}
|
|
4945
4995
|
function consumeSymbol($this) {
|
|
4946
|
-
var start = $this.
|
|
4947
|
-
$l$loop: while ($this.
|
|
4948
|
-
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);
|
|
4949
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);
|
|
4950
5000
|
if (isSymbolContinuation) {
|
|
4951
|
-
$this.
|
|
5001
|
+
$this.rq_1 = $this.rq_1 + 1 | 0;
|
|
4952
5002
|
} else {
|
|
4953
5003
|
break $l$loop;
|
|
4954
5004
|
}
|
|
4955
5005
|
}
|
|
4956
|
-
var value = substring_0($this.
|
|
5006
|
+
var value = substring_0($this.qq_1, start, $this.rq_1);
|
|
4957
5007
|
var type;
|
|
4958
5008
|
switch (value) {
|
|
4959
5009
|
case '1-0':
|
|
@@ -4965,7 +5015,7 @@ function consumeSymbol($this) {
|
|
|
4965
5015
|
type = TokenType_SYMBOL_getInstance();
|
|
4966
5016
|
break;
|
|
4967
5017
|
}
|
|
4968
|
-
$this.
|
|
5018
|
+
$this.tq_1.k(new Token(type, value, $this.sq_1));
|
|
4969
5019
|
}
|
|
4970
5020
|
function yieldBishopMoves(visibleSquaresBishop, moveFunction) {
|
|
4971
5021
|
return yieldBishopMoves$lambda(visibleSquaresBishop, moveFunction);
|
|
@@ -5568,7 +5618,7 @@ function strictMatch(idSupplier) {
|
|
|
5568
5618
|
_init_properties_factory_kt__5kmpyw();
|
|
5569
5619
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
5570
5620
|
var tmp$ret$0 = LinkedHashMap.v8();
|
|
5571
|
-
return Game.
|
|
5621
|
+
return Game.rm(tmp$ret$0, GameMode_MATCH_getInstance(), ThreeRepetitionsMode_STRICT_getInstance(), FiftyMovesRuleMode_STRICT_getInstance(), idSupplier);
|
|
5572
5622
|
}
|
|
5573
5623
|
function analysisGame(idSupplier) {
|
|
5574
5624
|
var tmp;
|
|
@@ -5581,7 +5631,7 @@ function analysisGame(idSupplier) {
|
|
|
5581
5631
|
_init_properties_factory_kt__5kmpyw();
|
|
5582
5632
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
5583
5633
|
var tmp$ret$0 = LinkedHashMap.v8();
|
|
5584
|
-
return Game.
|
|
5634
|
+
return Game.rm(tmp$ret$0, GameMode_ANALYSIS_getInstance(), ThreeRepetitionsMode_AWARE_getInstance(), FiftyMovesRuleMode_AWARE_getInstance(), idSupplier);
|
|
5585
5635
|
}
|
|
5586
5636
|
function customGame(gameMode, threeRepetitionsMode, fiftyMovesRuleMode, initialFen, initialTags, idSupplier) {
|
|
5587
5637
|
initialFen = initialFen === VOID ? null : initialFen;
|
|
@@ -5609,7 +5659,7 @@ function customGame(gameMode, threeRepetitionsMode, fiftyMovesRuleMode, initialF
|
|
|
5609
5659
|
// Inline function 'kotlin.collections.set' call
|
|
5610
5660
|
tags.f5('fen', initialFen);
|
|
5611
5661
|
}
|
|
5612
|
-
return Game.
|
|
5662
|
+
return Game.rm(tags, gameMode, threeRepetitionsMode, fiftyMovesRuleMode, idSupplier);
|
|
5613
5663
|
}
|
|
5614
5664
|
function parseGames(pgnInput, idSupplier) {
|
|
5615
5665
|
var tmp;
|
|
@@ -5621,9 +5671,9 @@ function parseGames(pgnInput, idSupplier) {
|
|
|
5621
5671
|
idSupplier = tmp;
|
|
5622
5672
|
_init_properties_factory_kt__5kmpyw();
|
|
5623
5673
|
var tokenizer = new Tokenizer(pgnInput);
|
|
5624
|
-
var tokens = tokenizer.
|
|
5674
|
+
var tokens = tokenizer.uq();
|
|
5625
5675
|
var parser = new Parser(tokens);
|
|
5626
|
-
var games = parser.
|
|
5676
|
+
var games = parser.vp(idSupplier);
|
|
5627
5677
|
return games;
|
|
5628
5678
|
}
|
|
5629
5679
|
function movesMap$lambda(it) {
|
|
@@ -5738,7 +5788,7 @@ function threats$lambda($visibleSquaresKing, $calculators, $visibleSquaresKnight
|
|
|
5738
5788
|
}
|
|
5739
5789
|
function eco$lambda(fen) {
|
|
5740
5790
|
_init_properties_factory_kt__5kmpyw();
|
|
5741
|
-
return Position.
|
|
5791
|
+
return Position.pq(fen);
|
|
5742
5792
|
}
|
|
5743
5793
|
function strictMatch$lambda() {
|
|
5744
5794
|
_init_properties_factory_kt__5kmpyw();
|
|
@@ -5849,7 +5899,7 @@ function _init_properties_factory_kt__5kmpyw() {
|
|
|
5849
5899
|
checkInfo = yieldCheckInfo(get_visibleSquares());
|
|
5850
5900
|
checkMask = yieldCheckMask(get_visibleSquares());
|
|
5851
5901
|
movesInfo = yieldMovesInfo(get_pawnMoves(), get_knightMoves(), get_bishopMoves(), get_rookMoves(), get_queenMoves(), get_kingMoves(), get_checkMask(), get_checkInfo());
|
|
5852
|
-
startpos = Position.
|
|
5902
|
+
startpos = Position.nq();
|
|
5853
5903
|
eco = Eco.hi(eco$lambda);
|
|
5854
5904
|
}
|
|
5855
5905
|
}
|
|
@@ -5864,74 +5914,74 @@ function generateChildren(mi, pos) {
|
|
|
5864
5914
|
}
|
|
5865
5915
|
function pawnTuples(mi, position, children) {
|
|
5866
5916
|
// Inline function 'kotlin.collections.forEach' call
|
|
5867
|
-
var _iterator__ex2g4s = mi.
|
|
5917
|
+
var _iterator__ex2g4s = mi.bo_1.x();
|
|
5868
5918
|
while (_iterator__ex2g4s.z()) {
|
|
5869
5919
|
var element = _iterator__ex2g4s.a1();
|
|
5870
|
-
var tmp = element.
|
|
5920
|
+
var tmp = element.fn();
|
|
5871
5921
|
var tmp_0 = pawnTuples$lambda;
|
|
5872
|
-
generateTuples(tmp, element.
|
|
5873
|
-
generatePromotionTuples(element.
|
|
5874
|
-
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();
|
|
5875
5925
|
var tmp_2 = pawnTuples$lambda_1;
|
|
5876
|
-
generateTuples(tmp_1, element.
|
|
5877
|
-
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();
|
|
5878
5928
|
if (tmp0_safe_receiver == null)
|
|
5879
5929
|
null;
|
|
5880
5930
|
else {
|
|
5881
5931
|
// Inline function 'kotlin.let' call
|
|
5882
|
-
generateEnPassantCaptureTuple(tmp0_safe_receiver, element.
|
|
5932
|
+
generateEnPassantCaptureTuple(tmp0_safe_receiver, element.ko_1, element.lo_1, position, children);
|
|
5883
5933
|
}
|
|
5884
5934
|
}
|
|
5885
5935
|
}
|
|
5886
5936
|
function knightBishopAndQueenTuples(mi, position, children) {
|
|
5887
5937
|
// Inline function 'kotlin.collections.forEach' call
|
|
5888
|
-
var _iterator__ex2g4s = mi.
|
|
5938
|
+
var _iterator__ex2g4s = mi.co_1.x();
|
|
5889
5939
|
while (_iterator__ex2g4s.z()) {
|
|
5890
5940
|
var element = _iterator__ex2g4s.a1();
|
|
5891
|
-
var tmp = element.
|
|
5941
|
+
var tmp = element.in();
|
|
5892
5942
|
var tmp_0 = knightBishopAndQueenTuples$lambda;
|
|
5893
|
-
generateTuples(tmp, element.
|
|
5943
|
+
generateTuples(tmp, element.zo_1, element.ap_1, element.bp_1, position, children, tmp_0, knightBishopAndQueenTuples$lambda_0);
|
|
5894
5944
|
}
|
|
5895
5945
|
// Inline function 'kotlin.collections.forEach' call
|
|
5896
|
-
var _iterator__ex2g4s_0 = mi.
|
|
5946
|
+
var _iterator__ex2g4s_0 = mi.do_1.x();
|
|
5897
5947
|
while (_iterator__ex2g4s_0.z()) {
|
|
5898
5948
|
var element_0 = _iterator__ex2g4s_0.a1();
|
|
5899
|
-
var tmp_1 = element_0.
|
|
5949
|
+
var tmp_1 = element_0.in();
|
|
5900
5950
|
var tmp_2 = knightBishopAndQueenTuples$lambda_1;
|
|
5901
|
-
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);
|
|
5902
5952
|
}
|
|
5903
5953
|
// Inline function 'kotlin.collections.forEach' call
|
|
5904
|
-
var _iterator__ex2g4s_1 = mi.
|
|
5954
|
+
var _iterator__ex2g4s_1 = mi.fo_1.x();
|
|
5905
5955
|
while (_iterator__ex2g4s_1.z()) {
|
|
5906
5956
|
var element_1 = _iterator__ex2g4s_1.a1();
|
|
5907
|
-
var tmp_3 = element_1.
|
|
5957
|
+
var tmp_3 = element_1.in();
|
|
5908
5958
|
var tmp_4 = knightBishopAndQueenTuples$lambda_3;
|
|
5909
|
-
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);
|
|
5910
5960
|
}
|
|
5911
5961
|
}
|
|
5912
5962
|
function rookTuples(mi, position, children) {
|
|
5913
5963
|
// Inline function 'kotlin.collections.forEach' call
|
|
5914
|
-
var _iterator__ex2g4s = mi.
|
|
5964
|
+
var _iterator__ex2g4s = mi.eo_1.x();
|
|
5915
5965
|
while (_iterator__ex2g4s.z()) {
|
|
5916
5966
|
var element = _iterator__ex2g4s.a1();
|
|
5917
|
-
var tmp = element.
|
|
5967
|
+
var tmp = element.in();
|
|
5918
5968
|
var tmp_0 = rookTuples$lambda;
|
|
5919
|
-
generateTuples(tmp, element.
|
|
5969
|
+
generateTuples(tmp, element.zo_1, element.ap_1, element.bp_1, position, children, tmp_0, rookTuples$lambda_0);
|
|
5920
5970
|
}
|
|
5921
5971
|
}
|
|
5922
5972
|
function kingTuples(mi, position, children) {
|
|
5923
|
-
var tmp = mi.
|
|
5973
|
+
var tmp = mi.go_1.fn();
|
|
5924
5974
|
var tmp_0 = kingTuples$lambda;
|
|
5925
|
-
generateTuples(tmp, mi.
|
|
5926
|
-
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);
|
|
5927
5977
|
}
|
|
5928
5978
|
function generateTuples(moves, pieceType, square, enemies, position, children, epFunction, castleFunction) {
|
|
5929
5979
|
// Inline function 'kotlin.collections.forEach' call
|
|
5930
5980
|
var _iterator__ex2g4s = moves.x();
|
|
5931
5981
|
while (_iterator__ex2g4s.z()) {
|
|
5932
5982
|
var element = _iterator__ex2g4s.a1();
|
|
5933
|
-
var move = element.
|
|
5934
|
-
var bitboards = position.
|
|
5983
|
+
var move = element.pn_1;
|
|
5984
|
+
var bitboards = position.fq();
|
|
5935
5985
|
var inductionVariable = 0;
|
|
5936
5986
|
if (inductionVariable <= 11)
|
|
5937
5987
|
do {
|
|
@@ -5953,7 +6003,7 @@ function generateTuples(moves, pieceType, square, enemies, position, children, e
|
|
|
5953
6003
|
var isCapture = isPresent(enemies & move);
|
|
5954
6004
|
var isPawnMove = isPresent(move & bitboards[(Piece_BP_getInstance().m2_1 - aux | 0) - 1 | 0]);
|
|
5955
6005
|
var hm = isCapture || isPawnMove ? 0 : position.mj_1 + 1 | 0;
|
|
5956
|
-
var tuple = tupleOf(Position.
|
|
6006
|
+
var tuple = tupleOf(Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm), element);
|
|
5957
6007
|
children.k(tuple);
|
|
5958
6008
|
}
|
|
5959
6009
|
}
|
|
@@ -5962,9 +6012,9 @@ function generatePromotionTuples(moves, pieceType, square, position, children) {
|
|
|
5962
6012
|
var _iterator__ex2g4s = moves.x();
|
|
5963
6013
|
while (_iterator__ex2g4s.z()) {
|
|
5964
6014
|
var element = _iterator__ex2g4s.a1();
|
|
5965
|
-
var move = element.
|
|
5966
|
-
var promotionPiece = element.
|
|
5967
|
-
var bitboards = position.
|
|
6015
|
+
var move = element.pn_1;
|
|
6016
|
+
var promotionPiece = element.rn_1;
|
|
6017
|
+
var bitboards = position.fq();
|
|
5968
6018
|
var inductionVariable = 0;
|
|
5969
6019
|
if (inductionVariable <= 11)
|
|
5970
6020
|
do {
|
|
@@ -6020,15 +6070,15 @@ function generatePromotionTuples(moves, pieceType, square, position, children) {
|
|
|
6020
6070
|
}
|
|
6021
6071
|
var hm = 0;
|
|
6022
6072
|
var ep = -1;
|
|
6023
|
-
var newPosition = Position.
|
|
6073
|
+
var newPosition = Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
|
|
6024
6074
|
children.k(tupleOf(newPosition, element));
|
|
6025
6075
|
}
|
|
6026
6076
|
}
|
|
6027
6077
|
function generateEnPassantCaptureTuple(m, pieceType, originSquare, position, children) {
|
|
6028
|
-
var move = m.
|
|
6078
|
+
var move = m.pn_1;
|
|
6029
6079
|
var whiteMove = position.fj_1;
|
|
6030
6080
|
var capture = shiftLeft(1n, countTrailingZeroBits(move) + (whiteMove ? -8 : 8) | 0);
|
|
6031
|
-
var bitboards = position.
|
|
6081
|
+
var bitboards = position.fq();
|
|
6032
6082
|
var inductionVariable = 0;
|
|
6033
6083
|
if (inductionVariable <= 11)
|
|
6034
6084
|
do {
|
|
@@ -6042,16 +6092,16 @@ function generateEnPassantCaptureTuple(m, pieceType, originSquare, position, chi
|
|
|
6042
6092
|
var hm = 0;
|
|
6043
6093
|
var mc = position.lj_1 + (wm ? 1 : 0) | 0;
|
|
6044
6094
|
var ep = -1;
|
|
6045
|
-
var newPosition = Position.
|
|
6046
|
-
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));
|
|
6047
6097
|
}
|
|
6048
6098
|
function generateCastleTuples(moves, kingPiece, square, position, children) {
|
|
6049
6099
|
// Inline function 'kotlin.collections.forEach' call
|
|
6050
6100
|
var _iterator__ex2g4s = moves.x();
|
|
6051
6101
|
while (_iterator__ex2g4s.z()) {
|
|
6052
6102
|
var element = _iterator__ex2g4s.a1();
|
|
6053
|
-
var move = element.
|
|
6054
|
-
var bitboards = position.
|
|
6103
|
+
var move = element.pn_1;
|
|
6104
|
+
var bitboards = position.fq();
|
|
6055
6105
|
var indexedObject = get_indexes();
|
|
6056
6106
|
var inductionVariable = 0;
|
|
6057
6107
|
var last = indexedObject.length;
|
|
@@ -6091,7 +6141,7 @@ function generateCastleTuples(moves, kingPiece, square, position, children) {
|
|
|
6091
6141
|
var hm = position.mj_1 + 1 | 0;
|
|
6092
6142
|
var mc = position.lj_1 + (wm ? 1 : 0) | 0;
|
|
6093
6143
|
var ep = -1;
|
|
6094
|
-
var newPosition = Position.
|
|
6144
|
+
var newPosition = Position.oq(bitboards, wm, ep, wk, wq, bk, bq, mc, hm);
|
|
6095
6145
|
children.k(tupleOf(newPosition, element));
|
|
6096
6146
|
}
|
|
6097
6147
|
}
|
|
@@ -8784,7 +8834,7 @@ function checkCollision(move, moves) {
|
|
|
8784
8834
|
_init_properties_moveFactory_kt__2023o9();
|
|
8785
8835
|
var m = moves[move.hashCode()];
|
|
8786
8836
|
if (!(m == null) && !equals(m, move)) {
|
|
8787
|
-
throw get_logger().
|
|
8837
|
+
throw get_logger().mn(RuntimeException.l7('hash collision for ' + m.toString() + ' and ' + move.toString()));
|
|
8788
8838
|
}
|
|
8789
8839
|
}
|
|
8790
8840
|
function hash(origin, target) {
|
|
@@ -8836,7 +8886,7 @@ function yieldMoves() {
|
|
|
8836
8886
|
while (inductionVariable_0 < last_0) {
|
|
8837
8887
|
var item_0 = white[inductionVariable_0];
|
|
8838
8888
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
8839
|
-
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);
|
|
8840
8890
|
destination_1.k(tmp$ret$13);
|
|
8841
8891
|
}
|
|
8842
8892
|
var list = destination_1;
|
|
@@ -8876,7 +8926,7 @@ function yieldMoves() {
|
|
|
8876
8926
|
while (inductionVariable_2 < last_2) {
|
|
8877
8927
|
var item_2 = white[inductionVariable_2];
|
|
8878
8928
|
inductionVariable_2 = inductionVariable_2 + 1 | 0;
|
|
8879
|
-
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);
|
|
8880
8930
|
destination_4.k(tmp$ret$26);
|
|
8881
8931
|
}
|
|
8882
8932
|
var list_0 = destination_4;
|
|
@@ -8916,7 +8966,7 @@ function yieldMoves() {
|
|
|
8916
8966
|
while (inductionVariable_4 < last_4) {
|
|
8917
8967
|
var item_4 = white[inductionVariable_4];
|
|
8918
8968
|
inductionVariable_4 = inductionVariable_4 + 1 | 0;
|
|
8919
|
-
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);
|
|
8920
8970
|
destination_7.k(tmp$ret$39);
|
|
8921
8971
|
}
|
|
8922
8972
|
var list_1 = destination_7;
|
|
@@ -8959,7 +9009,7 @@ function yieldMoves() {
|
|
|
8959
9009
|
while (inductionVariable_6 < last_6) {
|
|
8960
9010
|
var item_6 = black[inductionVariable_6];
|
|
8961
9011
|
inductionVariable_6 = inductionVariable_6 + 1 | 0;
|
|
8962
|
-
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);
|
|
8963
9013
|
destination_10.k(tmp$ret$55);
|
|
8964
9014
|
}
|
|
8965
9015
|
var list_2 = destination_10;
|
|
@@ -8999,7 +9049,7 @@ function yieldMoves() {
|
|
|
8999
9049
|
while (inductionVariable_8 < last_8) {
|
|
9000
9050
|
var item_8 = black[inductionVariable_8];
|
|
9001
9051
|
inductionVariable_8 = inductionVariable_8 + 1 | 0;
|
|
9002
|
-
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);
|
|
9003
9053
|
destination_13.k(tmp$ret$68);
|
|
9004
9054
|
}
|
|
9005
9055
|
var list_3 = destination_13;
|
|
@@ -9039,7 +9089,7 @@ function yieldMoves() {
|
|
|
9039
9089
|
while (inductionVariable_10 < last_10) {
|
|
9040
9090
|
var item_10 = black[inductionVariable_10];
|
|
9041
9091
|
inductionVariable_10 = inductionVariable_10 + 1 | 0;
|
|
9042
|
-
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);
|
|
9043
9093
|
destination_16.k(tmp$ret$81);
|
|
9044
9094
|
}
|
|
9045
9095
|
var list_4 = destination_16;
|
|
@@ -9062,7 +9112,7 @@ function yieldMoves() {
|
|
|
9062
9112
|
var j = inductionVariable_12;
|
|
9063
9113
|
inductionVariable_12 = inductionVariable_12 + 1 | 0;
|
|
9064
9114
|
if (!(j === i)) {
|
|
9065
|
-
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));
|
|
9066
9116
|
}
|
|
9067
9117
|
}
|
|
9068
9118
|
while (inductionVariable_12 <= 63);
|
|
@@ -9102,7 +9152,7 @@ function yieldMoveFromOriginTarget$lambda($moves) {
|
|
|
9102
9152
|
var tmp0_elvis_lhs = $moves[hash(origin, target)];
|
|
9103
9153
|
var tmp;
|
|
9104
9154
|
if (tmp0_elvis_lhs == null) {
|
|
9105
|
-
throw get_logger().
|
|
9155
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found'));
|
|
9106
9156
|
} else {
|
|
9107
9157
|
tmp = tmp0_elvis_lhs;
|
|
9108
9158
|
}
|
|
@@ -9116,7 +9166,7 @@ function yieldMoveFromOriginTargetPromotion$lambda($moves) {
|
|
|
9116
9166
|
var tmp0_elvis_lhs = $moves[hash(origin, target)];
|
|
9117
9167
|
var tmp_0;
|
|
9118
9168
|
if (tmp0_elvis_lhs == null) {
|
|
9119
|
-
throw get_logger().
|
|
9169
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found'));
|
|
9120
9170
|
} else {
|
|
9121
9171
|
tmp_0 = tmp0_elvis_lhs;
|
|
9122
9172
|
}
|
|
@@ -9125,7 +9175,7 @@ function yieldMoveFromOriginTargetPromotion$lambda($moves) {
|
|
|
9125
9175
|
var tmp1_elvis_lhs = $moves[hash_0(origin, target, promotionPiece)];
|
|
9126
9176
|
var tmp_1;
|
|
9127
9177
|
if (tmp1_elvis_lhs == null) {
|
|
9128
|
-
throw get_logger().
|
|
9178
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin + ', target=' + target + ' not found, promotionPiece=' + promotionPiece));
|
|
9129
9179
|
} else {
|
|
9130
9180
|
tmp_1 = tmp1_elvis_lhs;
|
|
9131
9181
|
}
|
|
@@ -9139,7 +9189,7 @@ function yieldMoveFromOriginTargetObjects$lambda($moves) {
|
|
|
9139
9189
|
var tmp0_elvis_lhs = $moves[hash(origin.m2_1, target.m2_1)];
|
|
9140
9190
|
var tmp;
|
|
9141
9191
|
if (tmp0_elvis_lhs == null) {
|
|
9142
|
-
throw get_logger().
|
|
9192
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin.toString() + ', target=' + target.toString() + ' not found'));
|
|
9143
9193
|
} else {
|
|
9144
9194
|
tmp = tmp0_elvis_lhs;
|
|
9145
9195
|
}
|
|
@@ -9151,7 +9201,7 @@ function yieldMoveFromOriginTargetPromotionObjects$lambda($moves) {
|
|
|
9151
9201
|
var tmp0_elvis_lhs = $moves[hash_0(origin.m2_1, target.m2_1, promotionPiece.m2_1)];
|
|
9152
9202
|
var tmp;
|
|
9153
9203
|
if (tmp0_elvis_lhs == null) {
|
|
9154
|
-
throw get_logger().
|
|
9204
|
+
throw get_logger().mn(MoveException.ao('move for origin=' + origin.toString() + ', target=' + target.toString() + ', promotion=' + promotionPiece.toString() + ' not found'));
|
|
9155
9205
|
} else {
|
|
9156
9206
|
tmp = tmp0_elvis_lhs;
|
|
9157
9207
|
}
|
|
@@ -9163,7 +9213,7 @@ function yieldMoveFromString$lambda($map) {
|
|
|
9163
9213
|
var tmp0_elvis_lhs = $map.j2(move);
|
|
9164
9214
|
var tmp;
|
|
9165
9215
|
if (tmp0_elvis_lhs == null) {
|
|
9166
|
-
throw MoveException.
|
|
9216
|
+
throw MoveException.ao(move + ' is not a valid move string');
|
|
9167
9217
|
} else {
|
|
9168
9218
|
tmp = tmp0_elvis_lhs;
|
|
9169
9219
|
}
|
|
@@ -9381,7 +9431,7 @@ function isStalemate(bitboards, isWhiteMove, legalMoves) {
|
|
|
9381
9431
|
return isInCheck === 0n && legalMoves === 0n;
|
|
9382
9432
|
}
|
|
9383
9433
|
function tupleOf(v1, v2) {
|
|
9384
|
-
return Tuple.
|
|
9434
|
+
return Tuple.vq(v1, v2);
|
|
9385
9435
|
}
|
|
9386
9436
|
function init_io_github_lunalobos_chess4kt_Tuple(_this__u8e3s4) {
|
|
9387
9437
|
}
|
|
@@ -9425,16 +9475,41 @@ function get_VALID_FULL_MOVE_COUNTER_PATTERN() {
|
|
|
9425
9475
|
return VALID_FULL_MOVE_COUNTER_PATTERN;
|
|
9426
9476
|
}
|
|
9427
9477
|
var VALID_FULL_MOVE_COUNTER_PATTERN;
|
|
9428
|
-
function get_PIECES() {
|
|
9429
|
-
_init_properties_util_kt__mcwhvi();
|
|
9430
|
-
return PIECES;
|
|
9431
|
-
}
|
|
9432
|
-
var PIECES;
|
|
9433
9478
|
function get_MOVE_PATTERN() {
|
|
9434
9479
|
_init_properties_util_kt__mcwhvi();
|
|
9435
9480
|
return MOVE_PATTERN;
|
|
9436
9481
|
}
|
|
9437
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;
|
|
9438
9513
|
function getColLetter(square) {
|
|
9439
9514
|
_init_properties_util_kt__mcwhvi();
|
|
9440
9515
|
var colNum = getCol(square);
|
|
@@ -9762,8 +9837,8 @@ function positionFromFen(fen) {
|
|
|
9762
9837
|
if (!isValidFenFormat(fen)) {
|
|
9763
9838
|
throw IllegalArgumentException.s('invalid fen ' + fen);
|
|
9764
9839
|
}
|
|
9765
|
-
var position = Position.
|
|
9766
|
-
var bitboards = Position.
|
|
9840
|
+
var position = Position.pq(fen);
|
|
9841
|
+
var bitboards = Position.pq(fen).fq();
|
|
9767
9842
|
var validCheck = !inCheck(bitboards, !position.fj_1);
|
|
9768
9843
|
var wpBitboards = bitboards[Piece_WP_getInstance().m2_1 - 1 | 0];
|
|
9769
9844
|
var bpBitboards = bitboards[Piece_BP_getInstance().m2_1 - 1 | 0];
|
|
@@ -9876,11 +9951,11 @@ function get_enPassantSquare(_this__u8e3s4) {
|
|
|
9876
9951
|
}
|
|
9877
9952
|
function get_draw(_this__u8e3s4) {
|
|
9878
9953
|
_init_properties_util_kt__mcwhvi();
|
|
9879
|
-
return _this__u8e3s4.
|
|
9954
|
+
return _this__u8e3s4.iq() || _this__u8e3s4.jq();
|
|
9880
9955
|
}
|
|
9881
9956
|
function get_gameOver(_this__u8e3s4) {
|
|
9882
9957
|
_init_properties_util_kt__mcwhvi();
|
|
9883
|
-
return _this__u8e3s4.
|
|
9958
|
+
return _this__u8e3s4.hq() || _this__u8e3s4.iq() || _this__u8e3s4.jq();
|
|
9884
9959
|
}
|
|
9885
9960
|
function get_sideToMove(_this__u8e3s4) {
|
|
9886
9961
|
_init_properties_util_kt__mcwhvi();
|
|
@@ -9888,7 +9963,7 @@ function get_sideToMove(_this__u8e3s4) {
|
|
|
9888
9963
|
}
|
|
9889
9964
|
function get_children(_this__u8e3s4) {
|
|
9890
9965
|
_init_properties_util_kt__mcwhvi();
|
|
9891
|
-
return generateChildren(_this__u8e3s4.
|
|
9966
|
+
return generateChildren(_this__u8e3s4.eq(), _this__u8e3s4);
|
|
9892
9967
|
}
|
|
9893
9968
|
function move(_this__u8e3s4, move) {
|
|
9894
9969
|
_init_properties_util_kt__mcwhvi();
|
|
@@ -9911,7 +9986,7 @@ function move(_this__u8e3s4, move) {
|
|
|
9911
9986
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pk_1;
|
|
9912
9987
|
var tmp;
|
|
9913
9988
|
if (tmp1_elvis_lhs == null) {
|
|
9914
|
-
throw MoveException.
|
|
9989
|
+
throw MoveException.ao('illegal move ' + move.toString());
|
|
9915
9990
|
} else {
|
|
9916
9991
|
tmp = tmp1_elvis_lhs;
|
|
9917
9992
|
}
|
|
@@ -9947,7 +10022,7 @@ function move_0(_this__u8e3s4, move, notation) {
|
|
|
9947
10022
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pk_1;
|
|
9948
10023
|
var tmp_0;
|
|
9949
10024
|
if (tmp1_elvis_lhs == null) {
|
|
9950
|
-
throw MoveException.
|
|
10025
|
+
throw MoveException.ao('illegal move ' + move);
|
|
9951
10026
|
} else {
|
|
9952
10027
|
tmp_0 = tmp1_elvis_lhs;
|
|
9953
10028
|
}
|
|
@@ -9979,7 +10054,7 @@ function move_0(_this__u8e3s4, move, notation) {
|
|
|
9979
10054
|
var tmp2_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pk_1;
|
|
9980
10055
|
var tmp_1;
|
|
9981
10056
|
if (tmp2_elvis_lhs == null) {
|
|
9982
|
-
throw MoveException.
|
|
10057
|
+
throw MoveException.ao('illegal move ' + move);
|
|
9983
10058
|
} else {
|
|
9984
10059
|
tmp_1 = tmp2_elvis_lhs;
|
|
9985
10060
|
}
|
|
@@ -9994,7 +10069,7 @@ function move_0(_this__u8e3s4, move, notation) {
|
|
|
9994
10069
|
}
|
|
9995
10070
|
function isLegal(_this__u8e3s4, move) {
|
|
9996
10071
|
_init_properties_util_kt__mcwhvi();
|
|
9997
|
-
var m = get_moveFromOriginTargetPromotion()(move.
|
|
10072
|
+
var m = get_moveFromOriginTargetPromotion()(move.qn_1, move.sn_1, move.rn_1);
|
|
9998
10073
|
var tmp0 = get_children(_this__u8e3s4);
|
|
9999
10074
|
var tmp$ret$0;
|
|
10000
10075
|
$l$block_0: {
|
|
@@ -10021,107 +10096,6 @@ function isLegal(_this__u8e3s4, move) {
|
|
|
10021
10096
|
}
|
|
10022
10097
|
return tmp$ret$0;
|
|
10023
10098
|
}
|
|
10024
|
-
function toSan(position, move_0) {
|
|
10025
|
-
_init_properties_util_kt__mcwhvi();
|
|
10026
|
-
// Inline function 'kotlin.require' call
|
|
10027
|
-
if (!isLegal(position, move_0)) {
|
|
10028
|
-
var message = 'illegal move ' + move_0.toString() + ' for position ' + position.lq();
|
|
10029
|
-
throw IllegalArgumentException.s(toString(message));
|
|
10030
|
-
}
|
|
10031
|
-
var sbSAN = StringBuilder.u();
|
|
10032
|
-
var piece = get_entries_0().c1(position.kq()[move_0.pn_1]);
|
|
10033
|
-
sbSAN.j8(get_PIECES()[piece.m2_1]);
|
|
10034
|
-
var isPawn = piece.equals(Piece_WP_getInstance()) || piece.equals(Piece_BP_getInstance());
|
|
10035
|
-
var tmp = asSequence(get_children(position));
|
|
10036
|
-
var tmp_0 = map(tmp, toSan$lambda);
|
|
10037
|
-
var tmp_1 = filter(tmp_0, toSan$lambda_0(move_0));
|
|
10038
|
-
var tmp_2 = filter(tmp_1, toSan$lambda_1(position, move_0));
|
|
10039
|
-
var moves = toList(filter(tmp_2, toSan$lambda_2(move_0)));
|
|
10040
|
-
var tmp$ret$2;
|
|
10041
|
-
$l$block_0: {
|
|
10042
|
-
// Inline function 'kotlin.collections.any' call
|
|
10043
|
-
var tmp_3;
|
|
10044
|
-
if (isInterface(moves, Collection)) {
|
|
10045
|
-
tmp_3 = moves.c2();
|
|
10046
|
-
} else {
|
|
10047
|
-
tmp_3 = false;
|
|
10048
|
-
}
|
|
10049
|
-
if (tmp_3) {
|
|
10050
|
-
tmp$ret$2 = false;
|
|
10051
|
-
break $l$block_0;
|
|
10052
|
-
}
|
|
10053
|
-
var _iterator__ex2g4s = moves.x();
|
|
10054
|
-
while (_iterator__ex2g4s.z()) {
|
|
10055
|
-
var element = _iterator__ex2g4s.a1();
|
|
10056
|
-
if (getCol(element.pn_1) === getCol(move_0.pn_1)) {
|
|
10057
|
-
tmp$ret$2 = true;
|
|
10058
|
-
break $l$block_0;
|
|
10059
|
-
}
|
|
10060
|
-
}
|
|
10061
|
-
tmp$ret$2 = false;
|
|
10062
|
-
}
|
|
10063
|
-
var sameColumn = tmp$ret$2;
|
|
10064
|
-
var tmp$ret$4;
|
|
10065
|
-
$l$block_2: {
|
|
10066
|
-
// Inline function 'kotlin.collections.any' call
|
|
10067
|
-
var tmp_4;
|
|
10068
|
-
if (isInterface(moves, Collection)) {
|
|
10069
|
-
tmp_4 = moves.c2();
|
|
10070
|
-
} else {
|
|
10071
|
-
tmp_4 = false;
|
|
10072
|
-
}
|
|
10073
|
-
if (tmp_4) {
|
|
10074
|
-
tmp$ret$4 = false;
|
|
10075
|
-
break $l$block_2;
|
|
10076
|
-
}
|
|
10077
|
-
var _iterator__ex2g4s_0 = moves.x();
|
|
10078
|
-
while (_iterator__ex2g4s_0.z()) {
|
|
10079
|
-
var element_0 = _iterator__ex2g4s_0.a1();
|
|
10080
|
-
if (getRow(element_0.pn_1) === getRow(move_0.pn_1)) {
|
|
10081
|
-
tmp$ret$4 = true;
|
|
10082
|
-
break $l$block_2;
|
|
10083
|
-
}
|
|
10084
|
-
}
|
|
10085
|
-
tmp$ret$4 = false;
|
|
10086
|
-
}
|
|
10087
|
-
var sameRow = tmp$ret$4;
|
|
10088
|
-
if (sameRow && !sameColumn && !isPawn) {
|
|
10089
|
-
sbSAN.j8(getColLetter(move_0.pn_1));
|
|
10090
|
-
}
|
|
10091
|
-
if (!sameRow && sameColumn) {
|
|
10092
|
-
sbSAN.za(getRow(move_0.pn_1) + 1 | 0);
|
|
10093
|
-
}
|
|
10094
|
-
if (sameRow && sameColumn) {
|
|
10095
|
-
sbSAN.j8(getColLetter(move_0.pn_1)).za(getRow(move_0.pn_1) + 1 | 0);
|
|
10096
|
-
}
|
|
10097
|
-
if (!sameRow && !sameColumn && !moves.c2() && !isPawn) {
|
|
10098
|
-
sbSAN.j8(getColLetter(move_0.pn_1));
|
|
10099
|
-
}
|
|
10100
|
-
var capture = !(position.kq()[move_0.rn_1] === Piece_EMPTY_getInstance().m2_1);
|
|
10101
|
-
if (capture) {
|
|
10102
|
-
if (isPawn) {
|
|
10103
|
-
sbSAN.j8(getColLetter(move_0.pn_1));
|
|
10104
|
-
}
|
|
10105
|
-
sbSAN.j8('x');
|
|
10106
|
-
}
|
|
10107
|
-
sbSAN.j8(getColLetter(move_0.rn_1)).za(getRow(move_0.rn_1) + 1 | 0);
|
|
10108
|
-
var isPromotion_0 = !(move_0.qn_1 === -1) && isPromotion(move_0.rn_1) === 1n;
|
|
10109
|
-
if (isPromotion_0) {
|
|
10110
|
-
sbSAN.j8('=').j8(get_PIECES()[move_0.qn_1]);
|
|
10111
|
-
}
|
|
10112
|
-
var isCastle = !!(piece === Piece_WK_getInstance() | piece === Piece_BK_getInstance()) && listOf(['e1g1', 'e1c1', 'e8g8', 'e8c8']).d2(move_0.toString());
|
|
10113
|
-
if (isCastle) {
|
|
10114
|
-
sbSAN = StringBuilder.u();
|
|
10115
|
-
sbSAN.j8(!!(startsWith(move_0.toString(), 'g1', 2) | startsWith(move_0.toString(), 'g8', 2)) ? 'O-O' : 'O-O-O');
|
|
10116
|
-
}
|
|
10117
|
-
var p = move(position, move_0);
|
|
10118
|
-
if (p.gq()) {
|
|
10119
|
-
sbSAN.j8('#');
|
|
10120
|
-
} else if (p.fq()) {
|
|
10121
|
-
sbSAN.j8('+');
|
|
10122
|
-
}
|
|
10123
|
-
return sbSAN.toString();
|
|
10124
|
-
}
|
|
10125
10099
|
function genericHashCode(a) {
|
|
10126
10100
|
_init_properties_util_kt__mcwhvi();
|
|
10127
10101
|
if (a == null)
|
|
@@ -10186,7 +10160,7 @@ function sanToMove(position, sanMove) {
|
|
|
10186
10160
|
var tmp3_elvis_lhs = tmp_0;
|
|
10187
10161
|
var tmp_1;
|
|
10188
10162
|
if (tmp3_elvis_lhs == null) {
|
|
10189
|
-
throw MoveException.
|
|
10163
|
+
throw MoveException.ao('Invalid castling move: ' + sanMove);
|
|
10190
10164
|
} else {
|
|
10191
10165
|
tmp_1 = tmp3_elvis_lhs;
|
|
10192
10166
|
}
|
|
@@ -10205,7 +10179,7 @@ function sanToMove(position, sanMove) {
|
|
|
10205
10179
|
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.zb_1;
|
|
10206
10180
|
var tmp_2;
|
|
10207
10181
|
if (tmp7_elvis_lhs == null) {
|
|
10208
|
-
throw MoveException.
|
|
10182
|
+
throw MoveException.ao('Missing target column in SAN move: ' + sanMove);
|
|
10209
10183
|
} else {
|
|
10210
10184
|
tmp_2 = tmp7_elvis_lhs;
|
|
10211
10185
|
}
|
|
@@ -10214,7 +10188,7 @@ function sanToMove(position, sanMove) {
|
|
|
10214
10188
|
var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.zb_1;
|
|
10215
10189
|
var tmp_3;
|
|
10216
10190
|
if (tmp9_elvis_lhs == null) {
|
|
10217
|
-
throw MoveException.
|
|
10191
|
+
throw MoveException.ao('Missing target row in SAN move: ' + sanMove);
|
|
10218
10192
|
} else {
|
|
10219
10193
|
tmp_3 = tmp9_elvis_lhs;
|
|
10220
10194
|
}
|
|
@@ -10255,7 +10229,7 @@ function sanToMove(position, sanMove) {
|
|
|
10255
10229
|
var xDestiny = getColIndex(targetCol);
|
|
10256
10230
|
var yDestiny = toInt(targetRow) - 1 | 0;
|
|
10257
10231
|
var destinySquare = getSquareIndex(xDestiny, yDestiny);
|
|
10258
|
-
var tmp_6 = asSequence(position.
|
|
10232
|
+
var tmp_6 = asSequence(position.eq().gp());
|
|
10259
10233
|
var tmp_7 = filter(tmp_6, sanToMove$lambda(destinySquare));
|
|
10260
10234
|
var tmp_8 = filter(tmp_7, sanToMove$lambda_0(position, piece));
|
|
10261
10235
|
var tmp0 = filter(tmp_8, sanToMove$lambda_1(origin_1));
|
|
@@ -10266,8 +10240,8 @@ function sanToMove(position, sanMove) {
|
|
|
10266
10240
|
while (_iterator__ex2g4s.z()) {
|
|
10267
10241
|
var element = _iterator__ex2g4s.a1();
|
|
10268
10242
|
var tmp_9;
|
|
10269
|
-
if (!(element.
|
|
10270
|
-
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);
|
|
10271
10245
|
tmp_9 = promotedPieceChar === promotionPieceSAN;
|
|
10272
10246
|
} else {
|
|
10273
10247
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -10283,7 +10257,7 @@ function sanToMove(position, sanMove) {
|
|
|
10283
10257
|
var tmp12_elvis_lhs = tmp$ret$13;
|
|
10284
10258
|
var tmp_10;
|
|
10285
10259
|
if (tmp12_elvis_lhs == null) {
|
|
10286
|
-
throw MoveException.
|
|
10260
|
+
throw MoveException.ao("The move '" + sanMove + "' is not a legal move in the current position " + position.mq());
|
|
10287
10261
|
} else {
|
|
10288
10262
|
tmp_10 = tmp12_elvis_lhs;
|
|
10289
10263
|
}
|
|
@@ -10336,35 +10310,137 @@ function deleteBefore(_this__u8e3s4, node) {
|
|
|
10336
10310
|
var oldParent = tmp;
|
|
10337
10311
|
// Inline function 'kotlin.apply' call
|
|
10338
10312
|
var this_0 = new RootNode(_this__u8e3s4, oldParent.uj());
|
|
10339
|
-
this_0.
|
|
10313
|
+
this_0.gl_1.k(node);
|
|
10340
10314
|
var newParent = this_0;
|
|
10341
10315
|
node.uk(newParent);
|
|
10342
|
-
_this__u8e3s4.
|
|
10316
|
+
_this__u8e3s4.gm(newParent);
|
|
10343
10317
|
var last_0 = last(asSequence_1(_this__u8e3s4.x()));
|
|
10344
|
-
_this__u8e3s4.
|
|
10318
|
+
_this__u8e3s4.vl(last_0);
|
|
10345
10319
|
var tmp0 = _this__u8e3s4.xj_1;
|
|
10346
10320
|
// Inline function 'kotlin.collections.set' call
|
|
10347
|
-
var value = newParent.
|
|
10321
|
+
var value = newParent.el_1.mq();
|
|
10348
10322
|
tmp0.f5('fen', value);
|
|
10349
10323
|
return node;
|
|
10350
10324
|
}
|
|
10351
10325
|
function whiteLacksOfMaterial(_this__u8e3s4) {
|
|
10352
10326
|
_init_properties_util_kt__mcwhvi();
|
|
10353
|
-
return isWhiteLackOfMaterial(_this__u8e3s4.
|
|
10327
|
+
return isWhiteLackOfMaterial(_this__u8e3s4.fq());
|
|
10354
10328
|
}
|
|
10355
10329
|
function blackLacksOfMaterial(_this__u8e3s4) {
|
|
10356
10330
|
_init_properties_util_kt__mcwhvi();
|
|
10357
|
-
return isBlackLackOfMaterial(_this__u8e3s4.
|
|
10331
|
+
return isBlackLackOfMaterial(_this__u8e3s4.fq());
|
|
10332
|
+
}
|
|
10333
|
+
function toSan_0(position, move_0, pieces) {
|
|
10334
|
+
pieces = pieces === VOID ? get_piecesEnglish() : pieces;
|
|
10335
|
+
_init_properties_util_kt__mcwhvi();
|
|
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();
|
|
10358
10434
|
}
|
|
10359
10435
|
function toSquares$lambda(it) {
|
|
10360
10436
|
_init_properties_util_kt__mcwhvi();
|
|
10361
10437
|
return Companion_instance_6.c1(countTrailingZeroBits(it));
|
|
10362
10438
|
}
|
|
10363
10439
|
function *_generator_invoke__zhh2q8_2($this, $this$sequence, $completion) {
|
|
10364
|
-
var copy = $this.
|
|
10440
|
+
var copy = $this.wq_1;
|
|
10365
10441
|
while (!(copy === 0n)) {
|
|
10366
10442
|
var lowestOneBit = copy & negate(copy);
|
|
10367
|
-
var tmp = $this$sequence.ud($this.
|
|
10443
|
+
var tmp = $this$sequence.ud($this.xq_1(lowestOneBit), $completion);
|
|
10368
10444
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
10369
10445
|
tmp = yield tmp;
|
|
10370
10446
|
copy = copy & ~lowestOneBit;
|
|
@@ -10373,29 +10449,16 @@ function *_generator_invoke__zhh2q8_2($this, $this$sequence, $completion) {
|
|
|
10373
10449
|
}
|
|
10374
10450
|
function bitboardToSequence$slambda_0($bitboard, $entitiesFactory) {
|
|
10375
10451
|
var i = new bitboardToSequence$slambda($bitboard, $entitiesFactory);
|
|
10376
|
-
var l = ($this$sequence, $completion) => i.
|
|
10452
|
+
var l = ($this$sequence, $completion) => i.yq($this$sequence, $completion);
|
|
10377
10453
|
l.$arity = 1;
|
|
10378
10454
|
return l;
|
|
10379
10455
|
}
|
|
10380
|
-
function toSan$lambda(it) {
|
|
10381
|
-
_init_properties_util_kt__mcwhvi();
|
|
10382
|
-
return it.qk_1;
|
|
10383
|
-
}
|
|
10384
|
-
function toSan$lambda_0($move) {
|
|
10385
|
-
return (m) => m.rn_1 === $move.rn_1;
|
|
10386
|
-
}
|
|
10387
|
-
function toSan$lambda_1($position, $move) {
|
|
10388
|
-
return (m) => get_entries_0().c1($position.kq()[m.pn_1]) === get_entries_0().c1($position.kq()[$move.pn_1]);
|
|
10389
|
-
}
|
|
10390
|
-
function toSan$lambda_2($move) {
|
|
10391
|
-
return (m) => !(m.pn_1 === $move.pn_1);
|
|
10392
|
-
}
|
|
10393
10456
|
function sanToMove$lambda($destinySquare) {
|
|
10394
|
-
return (m) => m.
|
|
10457
|
+
return (m) => m.sn_1 === $destinySquare;
|
|
10395
10458
|
}
|
|
10396
10459
|
function sanToMove$lambda_0($position, $piece) {
|
|
10397
10460
|
return (m) => {
|
|
10398
|
-
var movePiece = get_entries_0().c1($position.
|
|
10461
|
+
var movePiece = get_entries_0().c1($position.lq()[m.qn_1]);
|
|
10399
10462
|
return movePiece.equals($piece);
|
|
10400
10463
|
};
|
|
10401
10464
|
}
|
|
@@ -10407,10 +10470,10 @@ function sanToMove$lambda_1($origin) {
|
|
|
10407
10470
|
var tmp_0;
|
|
10408
10471
|
if (isDigit(first($origin))) {
|
|
10409
10472
|
var row = toInt($origin) - 1 | 0;
|
|
10410
|
-
tmp_0 = getRow(m.
|
|
10473
|
+
tmp_0 = getRow(m.qn_1) === row;
|
|
10411
10474
|
} else {
|
|
10412
10475
|
var col = getColIndex($origin);
|
|
10413
|
-
tmp_0 = getCol(m.
|
|
10476
|
+
tmp_0 = getCol(m.qn_1) === col;
|
|
10414
10477
|
}
|
|
10415
10478
|
|
|
10416
10479
|
tmp = tmp_0;
|
|
@@ -10425,6 +10488,19 @@ function sanToMove$lambda_1($origin) {
|
|
|
10425
10488
|
return tmp;
|
|
10426
10489
|
};
|
|
10427
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
|
+
}
|
|
10428
10504
|
var properties_initialized_util_kt_qfsh5w;
|
|
10429
10505
|
function _init_properties_util_kt__mcwhvi() {
|
|
10430
10506
|
if (!properties_initialized_util_kt_qfsh5w) {
|
|
@@ -10440,11 +10516,31 @@ function _init_properties_util_kt__mcwhvi() {
|
|
|
10440
10516
|
VALID_EN_PASSANT_PATTERN = Regex.nb('^[-]{1}$|^[abcdefgh][36]$');
|
|
10441
10517
|
VALID_HALF_MOVE_CLOCK_PATTERN = Regex.nb('^[0123456789]+$');
|
|
10442
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>[+#])?');
|
|
10443
10520
|
// Inline function 'kotlin.arrayOf' call
|
|
10444
10521
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
10445
10522
|
// Inline function 'kotlin.js.asDynamic' call
|
|
10446
|
-
|
|
10447
|
-
|
|
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'];
|
|
10448
10544
|
}
|
|
10449
10545
|
}
|
|
10450
10546
|
function yieldComputeVisible() {
|
|
@@ -10743,7 +10839,7 @@ function yieldComputeZobristHash() {
|
|
|
10743
10839
|
}
|
|
10744
10840
|
while (inductionVariable_2 < 64);
|
|
10745
10841
|
var t2 = System_instance.rg();
|
|
10746
|
-
logger.
|
|
10842
|
+
logger.nn(t1, t2);
|
|
10747
10843
|
return yieldComputeZobristHash$lambda(zobristTable, zobristTurn, zobristCastle, zobristEnPassant);
|
|
10748
10844
|
}
|
|
10749
10845
|
function yieldComputeZobristHash$lambda($zobristTable, $zobristTurn, $zobristCastle, $zobristEnPassant) {
|
|
@@ -10923,19 +11019,19 @@ var properties_initialized_Piece_kt_ae3dia;
|
|
|
10923
11019
|
function _init_properties_Piece_kt__xog22k() {
|
|
10924
11020
|
if (!properties_initialized_Piece_kt_ae3dia) {
|
|
10925
11021
|
properties_initialized_Piece_kt_ae3dia = true;
|
|
10926
|
-
EMPTY_0 = Companion_getInstance_9().
|
|
10927
|
-
WP_0 = Companion_getInstance_9().
|
|
10928
|
-
WN_0 = Companion_getInstance_9().
|
|
10929
|
-
WB_0 = Companion_getInstance_9().
|
|
10930
|
-
WR_0 = Companion_getInstance_9().
|
|
10931
|
-
WQ_0 = Companion_getInstance_9().
|
|
10932
|
-
WK_0 = Companion_getInstance_9().
|
|
10933
|
-
BP_0 = Companion_getInstance_9().
|
|
10934
|
-
BN_0 = Companion_getInstance_9().
|
|
10935
|
-
BB_0 = Companion_getInstance_9().
|
|
10936
|
-
BR_0 = Companion_getInstance_9().
|
|
10937
|
-
BQ_0 = Companion_getInstance_9().
|
|
10938
|
-
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);
|
|
10939
11035
|
}
|
|
10940
11036
|
}
|
|
10941
11037
|
function get_WHITE() {
|
|
@@ -10958,8 +11054,8 @@ var properties_initialized_Side_kt_xjv14p;
|
|
|
10958
11054
|
function _init_properties_Side_kt__trrix5() {
|
|
10959
11055
|
if (!properties_initialized_Side_kt_xjv14p) {
|
|
10960
11056
|
properties_initialized_Side_kt_xjv14p = true;
|
|
10961
|
-
WHITE_0 = Companion_getInstance_10().
|
|
10962
|
-
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);
|
|
10963
11059
|
}
|
|
10964
11060
|
}
|
|
10965
11061
|
function get_A1() {
|
|
@@ -11292,70 +11388,70 @@ var properties_initialized_Square_kt_d57phb;
|
|
|
11292
11388
|
function _init_properties_Square_kt__qeygot() {
|
|
11293
11389
|
if (!properties_initialized_Square_kt_d57phb) {
|
|
11294
11390
|
properties_initialized_Square_kt_d57phb = true;
|
|
11295
|
-
A1_0 = Companion_getInstance_11().
|
|
11296
|
-
B1_0 = Companion_getInstance_11().
|
|
11297
|
-
C1_0 = Companion_getInstance_11().
|
|
11298
|
-
D1_0 = Companion_getInstance_11().
|
|
11299
|
-
E1_0 = Companion_getInstance_11().
|
|
11300
|
-
F1_0 = Companion_getInstance_11().
|
|
11301
|
-
G1_0 = Companion_getInstance_11().
|
|
11302
|
-
H1_0 = Companion_getInstance_11().
|
|
11303
|
-
A2_0 = Companion_getInstance_11().
|
|
11304
|
-
B2_0 = Companion_getInstance_11().
|
|
11305
|
-
C2_0 = Companion_getInstance_11().
|
|
11306
|
-
D2_0 = Companion_getInstance_11().
|
|
11307
|
-
E2_0 = Companion_getInstance_11().
|
|
11308
|
-
F2_0 = Companion_getInstance_11().
|
|
11309
|
-
G2_0 = Companion_getInstance_11().
|
|
11310
|
-
H2_0 = Companion_getInstance_11().
|
|
11311
|
-
A3_0 = Companion_getInstance_11().
|
|
11312
|
-
B3_0 = Companion_getInstance_11().
|
|
11313
|
-
C3_0 = Companion_getInstance_11().
|
|
11314
|
-
D3_0 = Companion_getInstance_11().
|
|
11315
|
-
E3_0 = Companion_getInstance_11().
|
|
11316
|
-
F3_0 = Companion_getInstance_11().
|
|
11317
|
-
G3_0 = Companion_getInstance_11().
|
|
11318
|
-
H3_0 = Companion_getInstance_11().
|
|
11319
|
-
A4_0 = Companion_getInstance_11().
|
|
11320
|
-
B4_0 = Companion_getInstance_11().
|
|
11321
|
-
C4_0 = Companion_getInstance_11().
|
|
11322
|
-
D4_0 = Companion_getInstance_11().
|
|
11323
|
-
E4_0 = Companion_getInstance_11().
|
|
11324
|
-
F4_0 = Companion_getInstance_11().
|
|
11325
|
-
G4_0 = Companion_getInstance_11().
|
|
11326
|
-
H4_0 = Companion_getInstance_11().
|
|
11327
|
-
A5_0 = Companion_getInstance_11().
|
|
11328
|
-
B5_0 = Companion_getInstance_11().
|
|
11329
|
-
C5_0 = Companion_getInstance_11().
|
|
11330
|
-
D5_0 = Companion_getInstance_11().
|
|
11331
|
-
E5_0 = Companion_getInstance_11().
|
|
11332
|
-
F5_0 = Companion_getInstance_11().
|
|
11333
|
-
G5_0 = Companion_getInstance_11().
|
|
11334
|
-
H5_0 = Companion_getInstance_11().
|
|
11335
|
-
A6_0 = Companion_getInstance_11().
|
|
11336
|
-
B6_0 = Companion_getInstance_11().
|
|
11337
|
-
C6_0 = Companion_getInstance_11().
|
|
11338
|
-
D6_0 = Companion_getInstance_11().
|
|
11339
|
-
E6_0 = Companion_getInstance_11().
|
|
11340
|
-
F6_0 = Companion_getInstance_11().
|
|
11341
|
-
G6_0 = Companion_getInstance_11().
|
|
11342
|
-
H6_0 = Companion_getInstance_11().
|
|
11343
|
-
A7_0 = Companion_getInstance_11().
|
|
11344
|
-
B7_0 = Companion_getInstance_11().
|
|
11345
|
-
C7_0 = Companion_getInstance_11().
|
|
11346
|
-
D7_0 = Companion_getInstance_11().
|
|
11347
|
-
E7_0 = Companion_getInstance_11().
|
|
11348
|
-
F7_0 = Companion_getInstance_11().
|
|
11349
|
-
G7_0 = Companion_getInstance_11().
|
|
11350
|
-
H7_0 = Companion_getInstance_11().
|
|
11351
|
-
A8_0 = Companion_getInstance_11().
|
|
11352
|
-
B8_0 = Companion_getInstance_11().
|
|
11353
|
-
C8_0 = Companion_getInstance_11().
|
|
11354
|
-
D8_0 = Companion_getInstance_11().
|
|
11355
|
-
E8_0 = Companion_getInstance_11().
|
|
11356
|
-
F8_0 = Companion_getInstance_11().
|
|
11357
|
-
G8_0 = Companion_getInstance_11().
|
|
11358
|
-
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);
|
|
11359
11455
|
}
|
|
11360
11456
|
}
|
|
11361
11457
|
var Companion_instance_12;
|
|
@@ -11473,12 +11569,14 @@ protoOf(RootNode).xk = promoteChild;
|
|
|
11473
11569
|
protoOf(RootNode).yk = promoteNode;
|
|
11474
11570
|
protoOf(RootNode).zk = removeChild;
|
|
11475
11571
|
protoOf(RootNode).al = hasChildren;
|
|
11572
|
+
protoOf(RootNode).dl = toSan;
|
|
11476
11573
|
initMetadataForClass(RootNode, 'RootNode', VOID, VOID, [Node]);
|
|
11477
11574
|
protoOf(MoveNode).wk = appendMove$default;
|
|
11478
11575
|
protoOf(MoveNode).xk = promoteChild;
|
|
11479
11576
|
protoOf(MoveNode).yk = promoteNode;
|
|
11480
11577
|
protoOf(MoveNode).zk = removeChild;
|
|
11481
11578
|
protoOf(MoveNode).al = hasChildren;
|
|
11579
|
+
protoOf(MoveNode).dl = toSan;
|
|
11482
11580
|
initMetadataForClass(MoveNode, 'MoveNode', VOID, VOID, [Node]);
|
|
11483
11581
|
initMetadataForClass(GameMode, 'GameMode');
|
|
11484
11582
|
initMetadataForClass(ThreeRepetitionsMode, 'ThreeRepetitionsMode');
|