-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsender.js
935 lines (861 loc) · 92.1 KB
/
sender.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
var selectedpiece = {
'id': undefined,
'type': undefined,
'color': undefined,
'takeables': []
};
let movedPiece = []
var whiteKing = 5
var blackKing = 61
var turn = 'w'
let moved = []
const path = 'data:image/png;base64,'
let defaultBoard = 'wrook,wknight,wbishop,wqueen,wking,wbishop,wknight,wrook,wpawn,wpawn,wpawn,wpawn,wpawn,wpawn,wpawn,wpawn,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,bpawn,bpawn,bpawn,bpawn,bpawn,bpawn,bpawn,bpawn,brook,bknight,bbishop,bqueen,bking,bbishop,bknight,brook'
let pieces = {
wrook: 'iVBORw0KGgoAAAANSUhEUgAAAFkAAABUCAYAAADplZtxAAAAAXNSR0IArs4c6QAAChJJREFUeF7tnFlsTU8cx3+3VcRWW5QX0oRYo7aqqNoeSIhdQ4MXS2yRWOOBILaExKOdBw9CEEuQ2F5E7RHEixBRSygaa2lV2/PPd5zfZO7tuT0918y55/7vPS+3vfec35z5zG9+85vfb2ZClLqMEwgZLyFVAKUg+6AEKcgpyD4Q8KGIlCanIPtAwIcitGlyWlqaZVmWeOVQKET8N9eBv8MnrtraWseyQ6HQXyHK5SQvWjn43rKsOrLT09Ot2tpa8W72PXX+xu9qsbr4a4PMcAA3GmS1gk4gUCnAqKmpETIi5aiNyADS0tJkg/LvTrJZCfgdnEDzd7ZsfWy0tZatgahERkYGtWrVKkw0AHz79o3+/PnD8OrV5PT0dGrZsqWQFdkrWDC+x+8A/f79e3EfynfqJVACBty4cWPKzMwU91ZXV8vPL1++JIYmA86YMWPo2LFjYZChnaNGjaInT57Uay64WwPCuXPnKCcnR8pRtZC1DnJLS0upT58+UvOdNFk1Q0uXLqV169ZR06ZN5TP379+nqVOnUnl5ubRw2hRQm6BQSNhkaNb48ePpzJkzdSAPHjyYHj16JDQumnbyQ23atKHLly/TwIEDpe2MhGzbdnr79i116dJF3udWp9WrV9OGDRuoRYsW8tabN2+K90ZvC7S5ADho8oQJE+pAxqCSm5srIatd3glKhw4d6OLFizRo0CB0f3ELzIJ6cUO9fv2asrOzXRuOGwmQN27cSM2aNZMNk1CQUZFJkyY5QoZWwlwAmpsmZ2VlCcgDBgyQ90aD/O7dO8rLy4uqwDApFRUVolz0tBUrVhBAw1zwlVC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gPhPmzCs2HCZAfoxFeg2Qqb9LmcenR8wICJFsJeSZaF2GH6D4dQ+0lkZmhFg3r9pJpU12CPYQqaJujESrTpBJ5VebrFFF8pOEZgl5IueJEydcsTNXndxohL7vjewGwR+ib/kV1Fh5URSApuIJKopcFNm4fQGJbyDrhkd6Rt+U9V8CmcwPVVPUY9PIWy5YsMAVfq46udFkQMY8EEChLiO/c2JbZjTZ5sheMtViJt0AGK+PvpKMwTlWQCA+KBucaFGhfZ3uE7rSYj1RLWtQubUcALm8Zqp9A1mP/DJZKi7jabFuJLHCIPT5TIzdn35u3HQtdoynKBG2cE6qCQ2ldIFSCMY9c+aMawV13dGNA2Jrr80q3AiYrn00imivBDLWy5Ytc42d647nA0GD8vby0smlK3he5qWZd1ZoZGV4wu1/zuYQ3NMKPQEAAAAASUVORK5CYII=',
wbishop: 'iVBORw0KGgoAAAANSUhEUgAAAFkAAABUCAYAAADplZtxAAAAAXNSR0IArs4c6QAAEvpJREFUeF7tnQesVEUbhuei9KrYAUFURFBREAVFFBUQsYMQEBV7YokNu7HEEnvvvaCJikalqdEgElBUsAKCgI0ignQBATl/ni/77j/MPXt379U9ezCeZNm77czMO9+8X52hzP13FR2BsqK38F8DbpMBef/994+++eYbt27dOle/fn23++67u/Hjx28S/U99J+vVqxf98ccfG62HatWquQ0bNth7O+20k5s9e3aqx5HqzlWrVi2KosjALCsrc4DLM+8BMg9eb7PNNm7BggWpHUtqO1ajRo0IauDabLPN3DHHHOP69OnjGjdu7GbOnOleffVV9/HHH7v169fbd/bbbz83ceLEVI4nlZ0CtM033zz666+/eHb33HOPO+OMM1ytWrWytLFq1Sp3/fXXuwcffNCAbtSokVu8eHEqx5PKTrVv3z766quvjA5atWrlxo4da5QANeiCMmbPnu169+7tZsyY4WrUqOH+/PPPVI4nlZ1q1apVNGvWLMOzc+fObvjw4Sap/gXIS5YscaeeeqobNWqUfbT33nu7yZMnp25MqesQYHXq1Cn69NNPDbidd97ZTZgwwW211VblQF64cKHr16+f++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gmXLloX87nM792ISmawFCxYkikuijZUvXz4QhxL96fAOO+xggP/xxx9uyZIlZjF8V7FixbSWV7VqVQODgV900UXu9ttvNy4GXD/wAW6nTp3c559/bgBl8pJ69eoF8+bNCye9SpUqRkPcY/78+QRPC7AYQa1atdy8efMSwyaxhrAKKAIgypYt63r06OGuv/56e89AAPn00093kydPNgPC8tasWRN7/7p16wa//fabXde+fXv34osvGm0wQTq4DyDD01h0NpCLFStmHsZx3HHHuUceecRVqFDB/l61apXr3bu3e//99y3QZmvr/0YXjRo1Cr777jsDonv37u7BBx90WIssDw6cM2eOO/LII00dcN4+++zjpkyZsgXQrVu3Dj788EOz3Bo1apil7rjjjtaW2sM7XnnlFXfxxRdb8IOC1q5dGztpnTp1CoYNG2b3bNmypXvzzTcdioS/uQfH0qVLXZs2bdy3335rerxevXpu9uzZiRhhIo2kLDNYt26d0cALL7xgFui7NuesXr3awL/llltscJmsOS8vz8wOIJo2bWrWvNNOO5lnrFy50r333nvuiiuusAmTAknn4lWqVAkAEZp69NFH3TnnnGPt+rqb92+99ZZ5G+0TA5YuXZoIPok0IpDXrl1rljdq1Ci37777bhH0mISPPvrIJoBBZQK5fv36AZbPZMCTWHLDhg1dtWrVjCa+/vprsz5RwKZNm9KOxZ8w+taqVaswiApo7jNz5kx3xBFHoLmNnlasWJEIPrGNtG/fPpg7d64NbpdddnHDhg3LerPSpUubJROgcOO2bdtuoS6QXWhbLJCjVKlScGDatitVqhRIB0eDnpQL7WQCOHUfk4NY71NPPWXW6lOPgCb5Oe2004x+ypUrl5OkI2n6/vvvzRh23313qGiL8Wz2QZ06dYI///zTOEkWQmfgu/r168NXaQGpVatWsGDBAgsaZ511lrv77ruNOqRr6QRRHE7GQjmwzjlz5mScQHG9qId2fFc/6aST3JAhQzK20aJFi+CLL76w6w499FDjZIKeH0hRMx06dDD+Z0IyeZmCvHS2xqh+1a5dGxoL+2Rv2rRpYzUCLJGDAWHFNKKiDO9x1UWLFqUdUPHixU1dwGeXXnqpO+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0o0eProqBqA4jamqMb9l80AScQOdvAna55ZZzixYtWmY82KdRo0Z2niAIquP+0npcHvs3b948WLhwocM7BawPFqAtXrzY/ga4fCa95r3UoKy44opu7ty5DSD7A9apU6fgyy+/NKDlrT51hOmi4KnLjDngN23atKokXlWMdJLo8JMRMr4GnZwEtZT7ALI4uaF2kRK8pLs3gJwUqQr2awC5AvCSHtpQIEqKVAX7+Wk1Mu7ff/+tP5N2BfddJ4fSEfn9998jpR0TYbt27dz06dOrGvCqNa5du3bBzz//XNTMpZIOfd+2bduq7f1VJcgtW7YMZs+eXcz+oIcOHTq45s2bW8pMwvLbb7+5n376Semz7VvIDKvunqrOIDrSAIiHkr1tv/327swzz3TbbrutW2mllew7Ckl//vmne/75590jjzziPv74Y0dazsbfFy1aVFX3VVXGFEjeikWkxieffLK79NJLrUiv6ppfROI7+PqGG25w119/fbGOscUWWwB81dxb1RgCeOuss04wffp0R734+OOPN/CgCm1R9Qv+Nn/+fHfJJZfY/tqqpQJnBa8sJcKAAQOCWbNmmdfhfaNGjUp1fmQavLrGGmu4zz//3K2++upFVRG20y8eQS14dK9evdynn35q11+yZEmqa2eJwzK2VnLybt26BW+99VYxTOVpqjF4dV238cYbu0mTJpW88YEDBwZPPPGEceoFF1zgLrroopIF/CibmQyhjHPPPdcmQAZo5syZkdfr27dv8Morr6C17VQcK1vD5+Z77qtnz55uzJgxZQ1cWQd16dIl+Oyzz4r1X4ARsL6Hheu9ta2ZYML79ddfHXXg5557zvXo0SMRyLou4IwfP97tuuuuvqYu3l+/fv2CF154wQr94nfVrLGfl/hespB9VeMW+FtvvbX74IMPUuGWaufC7G3VMBmCcSQEu+++u+vSpYtbddVVzbA//vjDTZ482b3xxhvu22+/tQK7DOZY9ps1a5Z/fZvwVl55Zff111+71q1bx4LsA4xtU6dOdZtuuqldy6eMxo0bF23me7yTFzZ069bNbbnllq59+/amXvj7nDlzzOaJEyc6IhXOB3Bdr6BwEmOXeEcjcG+BCRfad9993UknneR22WUXm6zCExR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ErkJggg==',
bking: 'iVBORw0KGgoAAAANSUhEUgAAAFkAAABUCAYAAADplZtxAAAAAXNSR0IArs4c6QAAFS5JREFUeF7t3QeQVFXTBuCLwmdCxYARc8KAKGbMOQcUI2qZc06Ycy5jaZlzKFExAIoK5pxQFEEx56yIigqo89dzanrrMt/szs7s+Ln7F7dqatK95/Z5u/vtcM7stsva0DHDDDMUFl544ey1115r14bEztqMsFNOOWUBsIVCIfv777/bjNxkbjPCtmvXLoHs2HTTTbMHHnig7cjeVtxuiimmKLBix+abb54NHDhwMsj1Vh5LDpA322yzyZZcb4ATr00G+Z+AddIx8yCji0GDBk2mi3rDPtmS641omfEi8OHlyZxcI+CLL754Yfz48SkPjgAXQ/n8m2++SZ+3a9cum2aaabJZZ501vY7D6/h+ySWXbFWBsVXwGiqYYoopsr/++ivzXApyMfA1gFj6fR7g+G6XXXbJbrnlltYxvxoNr66XATmsshzAeZAbu3EAHda8zTbbZP37958McgDWp0+fwp133pn9+eefzbbkvPVGuR3P88wzT/bZZ5+1CoDbVFmtdxF8vf7662dDhgxpNSBWcus2I2i+rJZdTM6TK6m2hu+jQYQmNtlkk1aVPVSaTpu05MlduEpqrfF7dBGBbTLINYJY6bIIfM7baKONssGDB7cZL2wTgi6xxBKFd955p6FImWqqqbKVVlope+qpp9qE/K1ayA4dOhTkzuVK5/js77//zpTRI0eObLVzaZWC9ejRozB8+PCGPkb79u2zKaecsgFswJf2OIpleaucT6sTaoUVVii8+uqrqfnjsfTSS2cHHnhgtuyyy2adO3dOQI8ZMyZ78cUXs7POOiv79NNP03nR82iNi6ytCuS55pqr8PXXXycrZb0nnHBCdswxx2RTTz21Fer0CEA9s+gbb7wxu+yyy7K333674fvWBnSrAjnSNACyUgADVptzyJAh2ccff5wJequsskp6dOjQIYF+7bXXJqBHjRqVFKR38emnn7aaudVVkF69ehV++umnNHmuffvttzd7/Kmnnjr1kx2o4YUXXkiA3XXXXdnBBx+c/frrrw2WCth11lknu/nmm7PZZpstUQWgDzrooGTdvq/Gmsn9xRdfZL///ns2/fTTpzHvv//+ZsteKf1s0UD4c9iwYQ33iDZjBCWTj2O55ZbLXnnllUbvF70JAA0ePDhbb731MsFvzTXXzH777bdJ7mFc522wwQbZHXfckc0wwwwJ5HvvvTd79NFHK26AmWeeeQpfffVVGpOnxJGXP7p87rX22msbt2asarow8tZ8izGvzdImev59p06dsh9//PG/7hu9CaseH374YbKo3XffPbv77rsnadbnJ/+f//wne+6557Lu3bun219//fXZfvvtl16vscYak+TRDGLkyJFpYYC1e3aUa5k2tuLifn/88UfVmFV9Qfv27QshIM3TtKWghRZaKJtvvvkyIE6YMCFjKR4ffPBBcvWwkpjAvPPOi2PT/Xv27FkIelh88cWzt956K12zzDLLJB4OZUbQY30x3j777JNdeOGF2bTTTpusef/990/fLbrootno0aPbGZtHTJw4MYEbiwJSQrSw4IILZnPMMUe2wAILZEBEWR999FH2+eefJ2XLZMLiQyFkHDVqVLOxa/aJCy+8cMFN80KyoCOOOCLbcMMNEw/LCPIrFJQxbty4TEP+tttuSxkA3ssfu+22W/bwww83rOHttNNO2a233pqNHTs2m3POOdOkG1uOMs7KK6+c6GXGGWdsANnnkVeTB8DxmTFZOeUstdRSSW6Gks/Dye3BWB566KHsoosuylSc3ocsc889N0U0C79mnTTzzDMXfvzxxyQMoVnupZdemsDl3iyg9CBkCE444LLQ4447zq5MbtcgcCjG+UcffXR29tlnJwuaffbZ02TzvOk++XXAFVdcMSkJL5PpyCOPbKCB8ADjzjXXXMkgdtxxxySzR3hVjJeniaASSmYozzzzTHbIIYdkX375ZZLJubz3vffeq4hhxRN69+5duO+++9LAhJUePfDAA5ktrMClWQBSwi+//JIAYNEdO3ZM1OGcEJ5FoYHHH388gSGix7iRAwOKyxuTlUb+m1diKFv+TCl9+/ZNFkmBrC7Gcg0Z+vTpk9LBWWaZJaWAQXO+ByLZBdew+Ommmy6beeaZGxRBfkbx3XffZb17904B2bnkaE4WUxHk6B8AGHeJ3gB2Yze95JJLsgEDBmQ///xzcic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dWUvIxwOs5ubG+UMlCsAx6EZdHl5Wa4ghNOX1bhI/b94BAwFd3d3s1wup5SDUuHgCLy6e3x8bPjkdHqw8oQA/Pj4OEsmk8pYKBMMDi4vL/O1tbXyZilFyMLBGmUslAkGyHiYG/Ov7MWGlUitNgYgQ1Mfro+PDyU8lAg1Fxhf9vAoAsaFED6Inp4elslkpDORLhAMDofDRiVRb5c5MUpnIl0gpgmK+dfKQ49EIuz29lYqF6nCxHKNanqoBtqs46VykSpMzMX1Chl8gG+BOTo6ksZGmiAwDjZHE4kE2Zq4WhTjRCh7Z1sq5K6uLn59fS29L2wFjqwxKupmqZDxKCzV1Z2VB6HihUslkFXs11kBJGMMQh4ZGWFnZ2dS+EgRgs5BJGNeq9cSDiHLzMvSIC8sLPCtrS1lZyhkRKkVGSpOgUqDPDw8zM/Pz8tfklevJZyK88zSILe1tX3Zt6tnyELKk8JHihAwqqmpyXirFK56n/iEl4Wk8JEiBMCK74AgaCs5kNoY0jk5GAzyl5eXMrN6Txem/VKCUIoQIBuLxYxXxsSNUmpRasUe0pE8PT3N9/f3xa+oseITuTGkIZu0jDdM/4WcTDJdiJBVnW1zKuzB/kAgwAqFgpR0KkWIuKwWyh+nmEjVg4sReP3h5ORECh8pQtBL8R2Qeu1dqGh1/gFtPgCCqsUP4wAAAABJRU5ErkJggg=='
}
$('#1').addClass("wrook")
$('#2').addClass("wknight")
$('#3').addClass("wbishop")
$('#4').addClass("wqueen")
$('#5').addClass("wking")
$('#6').addClass("wbishop")
$('#7').addClass("wknight")
$('#8').addClass("wrook")
for (let a = 1; a <= 8; a++) {
$('#' + (a + 8)).addClass("wpawn")
$('#' + (a + 48)).addClass("bpawn")
}
$('#57').addClass("brook")
$('#58').addClass("bknight")
$('#59').addClass("bbishop")
$('#60').addClass("bqueen")
$('#61').addClass("bking")
$('#62').addClass("bbishop")
$('#63').addClass("bknight")
$('#64').addClass("brook")
function drawBoard(callMain) {
if (turn == 'w') $('#result').html("It's White's turn!")
if (turn == 'b') $('#result').html("It's Black's turn!")
let lane = 1;
for (let i = 1; i <= 64; i++) {
if (lane % 2 == 0 && i % 2 == 1) $('#' + i).css('background-color', '#555')
else if (lane % 2 == 1 && i % 2 == 0) $('#' + i).css('background-color', '#555')
else $('#' + i).css('background-color', '#333')
if (i % 8 == 0) {
if (lane == 1) lane = 2;
else if (lane == 2) lane = 1;
}
removePieceImage(i + "i")
appendPieceImage(($('#' + i).attr('class')).slice(11), i, i + "i")
}
$(`#${movedPiece[0]}`).css('background-color', '#55a')
$(`#${movedPiece[1]}`).css('background-color', '#aaf')
}
drawBoard()
$('.chessboard').click(function() {
if(turn == 'b') return;
let pieceType = ($(this).attr('class')).slice(12);
let pieceColor = ($(this).attr('class')).slice(11, 12);
let id = parseInt(this.id);
let row = Math.floor((id + 7) / 8);
let column = id % 8;
logic(pieceType, pieceColor, id, row, column)
})
function logic(pieceType, pieceColor, id, row, column) {
if (whiteKing == 'dead' || blackKing == 'dead') return;
drawBoard()
let takeables = []
let check = ''
for (let i = 1; i <= 64; i++) {
let apieceType = ($(`#${i}`).attr('class')).slice(12);
let apieceColor = ($(`#${i}`).attr('class')).slice(11, 12);
var res = checkForCheck(apieceType, i, apieceColor)
for (let i = 0; i <= res.length; i++) {
if (res[i - 1] != undefined) takeables.push(res[i - 1])
}
}
if (takeables.includes(whiteKing)) check = 'White';
if (takeables.includes(blackKing)) check = 'Black';
if (check != '') {
$('#result').append('<br>' + check + '\'s king is in check!')
}
if ((selectedpiece.takeables).includes(id) == true) {
if (turn == 'w') turn = 'b';
else if (turn == 'b') turn = 'w';
if (selectedpiece.type == 'rook' && pieceType == 'king' && pieceColor == selectedpiece.color && moved.includes(id) == false && moved.includes(selectedpiece.id) == false) {
if (selectedpiece.id == 8 && id == 5 && pieceColor == 'w') {
$('#6').addClass('wrook')
$('#5').removeClass('wking')
$('#7').addClass('wking')
$('#8').removeClass('wrook')
whiteKing = 7
} else if (selectedpiece.id == 1 && id == 5 && pieceColor == 'w') {
$('#4').addClass('wrook')
$('#5').removeClass('wking')
$('#3').addClass('wking')
$('#1').removeClass('wrook')
whiteKing = 3
} else if (selectedpiece.id == 64 && id == 61 && pieceColor == 'b') {
$('#62').addClass('brook')
$('#61').removeClass('bking')
$('#63').addClass('bking')
$('#64').removeClass('brook')
blackKing = 63
} else if (selectedpiece.id == 57 && id == 61 && pieceColor == 'b') {
$('#60').addClass('brook')
$('#61').removeClass('bking')
$('#59').addClass('bking')
$('#57').removeClass('brook')
blackKing = 59
}
drawBoard()
takeables = []
check = ''
for (let i = 1; i <= 64; i++) {
let apieceType = ($(`#${i}`).attr('class')).slice(12);
let apieceColor = ($(`#${i}`).attr('class')).slice(11, 12);
let res = checkForCheck(apieceType, i, apieceColor)
for (let i = 0; i <= res.length; i++) {
if (res[i - 1] != undefined) takeables.push(res[i - 1])
}
}
if (takeables.includes(whiteKing)) check = 'White';
if (takeables.includes(blackKing)) check = 'Black';
if (check != '') {
$('#result').append('<br>' + check + '\'s king is in check!')
}
if (conn && conn.open) {
let data = ''
let res = []
for (let i = 1; i <= 64; i++) {
res.push(($('#' + i).attr('class')).slice(11))
}
data = `${res};${turn};${whiteKing};${blackKing};${moved.join(',')};${id};${selectedpiece.id}`;
conn.send(data);
}
selectedpiece = {
'id': undefined,
'type': undefined,
'color': undefined,
'takeables': []
};
return;
}
if (selectedpiece.type == 'king' && pieceType == 'rook' && pieceColor == selectedpiece.color && moved.includes(id) == false && moved.includes(selectedpiece.id) == false) {
if (selectedpiece.id == 5 && id == 8 && pieceColor == 'w') {
$('#6').addClass('wrook')
$('#5').removeClass('wking')
$('#7').addClass('wking')
$('#8').removeClass('wrook')
whiteKing = 7
} else if (selectedpiece.id == 5 && id == 1 && pieceColor == 'w') {
$('#4').addClass('wrook')
$('#5').removeClass('wking')
$('#3').addClass('wking')
$('#1').removeClass('wrook')
whiteKing = 3
} else if (selectedpiece.id == 61 && id == 64 && pieceColor == 'b') {
$('#62').addClass('brook')
$('#61').removeClass('bking')
$('#63').addClass('bking')
$('#64').removeClass('brook')
blackKing = 63
} else if (selectedpiece.id == 61 && id == 57 && pieceColor == 'b') {
$('#60').addClass('brook')
$('#61').removeClass('bking')
$('#59').addClass('bking')
$('#57').removeClass('brook')
blackKing = 59
}
moved.push(selectedpiece.id)
moved.push(id)
drawBoard()
takeables = []
check = ''
for (let i = 1; i <= 64; i++) {
let apieceType = ($(`#${i}`).attr('class')).slice(12);
let apieceColor = ($(`#${i}`).attr('class')).slice(11, 12);
let res = checkForCheck(apieceType, i, apieceColor)
for (let i = 0; i <= res.length; i++) {
if (res[i - 1] != undefined) takeables.push(res[i - 1])
}
}
if (takeables.includes(whiteKing)) check = 'White';
if (takeables.includes(blackKing)) check = 'Black';
if (check != '') {
$('#result').append('<br>' + check + '\'s king is in check!')
}
if (conn && conn.open) {
let data = ''
let res = []
for (let i = 1; i <= 64; i++) {
res.push(($('#' + i).attr('class')).slice(11))
}
data = `${res};${turn};${whiteKing};${blackKing};${moved.join(',')};${id};${selectedpiece.id}`;
conn.send(data);
}
selectedpiece = {
'id': undefined,
'type': undefined,
'color': undefined,
'takeables': []
};
return;
}
$('#' + id).addClass(selectedpiece.color + selectedpiece.type)
$('#' + id).removeClass(pieceColor + pieceType)
$('#' + selectedpiece.id).removeClass(selectedpiece.color + selectedpiece.type)
if (selectedpiece.type == 'pawn' && row == 1 || selectedpiece.type == 'pawn' && row == 8) {
$('#' + id).addClass(selectedpiece.color + 'queen')
$('#' + id).removeClass(selectedpiece.color + selectedpiece.type)
}
drawBoard()
if (pieceType == 'king') {
if (pieceColor == 'b') {
$('#result').html('White won!')
whiteKing = 'dead'
}
if (pieceColor == 'w') {
$('#result').html('Black won!')
blackKing = 'dead'
}
}
if (selectedpiece.type == 'king') {
if (selectedpiece.color == 'w') whiteKing = id;
else if (selectedpiece.color == 'b') blackKing = id;
}
if (selectedpiece.type == 'rook') moved.push(id)
if (selectedpiece.type == 'king') moved.push(id)
takeables = []
check = ''
for (let i = 1; i <= 64; i++) {
let apieceType = ($(`#${i}`).attr('class')).slice(12);
let apieceColor = ($(`#${i}`).attr('class')).slice(11, 12);
let res = checkForCheck(apieceType, i, apieceColor)
for (let i = 0; i <= res.length; i++) {
if (res[i - 1] != undefined) takeables.push(res[i - 1])
}
}
if (takeables.includes(whiteKing)) check = 'White';
if (takeables.includes(blackKing)) check = 'Black';
if (check != '') {
if (whiteKing == 'dead' || blackKing == 'dead') return;
$('#result').append('<br>' + check + '\'s king is in check!')
}
playSound('move-self')
if (conn && conn.open) {
let data = ''
let res = []
for (let i = 1; i <= 64; i++) {
res.push(($('#' + i).attr('class')).slice(11))
}
data = `${res};${turn};${whiteKing};${blackKing};${moved.join(',')};${id};${selectedpiece.id}`;
conn.send(data);
}
selectedpiece = {
'id': undefined,
'type': undefined,
'color': undefined,
'takeables': []
};
return;
}
if (pieceColor != turn && pieceType != '') return;
selectedpiece = {
'id': id,
'type': pieceType,
'color': pieceColor,
'takeables': []
};
if (pieceType != '') placeHighlights(id, '#777')
//pawn highlighting
if (pieceType == 'pawn') {
if (pieceColor == 'b') {
if (id - 8 <= 0) return;
if (($('#' + (id - 8)).attr('class')).slice(12) == '') {
placeHighlights((id - 8), '#885')
if (id - 16 <= 0) return;
if (($('#' + (id - 16)).attr('class')).slice(12) == '' && row == 7) {
placeHighlights((id - 16), '#885')
}
}
if (id - 9 > 0) {
if (($('#' + (id - 9)).attr('class')).slice(11, 12) == 'w' && Math.floor((id - 2) / 8) == row - 1) {
placeHighlights(id - 9, '#855')
}
}
if (id - 7 > 0) {
if (($('#' + (id - 7)).attr('class')).slice(11, 12) == 'w' && Math.floor(id / 8) == row - 1) {
placeHighlights(id - 7, '#855')
}
}
}
if (pieceColor == 'w') {
if (id + 8 > 64) return;
if (($('#' + (id + 8)).attr('class')).slice(12) == '') {
placeHighlights((id + 8), '#885')
if (id + 16 > 64) return;
if (($('#' + (id + 16)).attr('class')).slice(12) == '' && row == 2) {
placeHighlights((id + 16), '#885')
}
}
if (id + 9 <= 64) {
if (($('#' + (id + 9)).attr('class')).slice(11, 12) == 'b' && Math.floor((id + 16) / 8) == row + 1) {
placeHighlights(id + 9, '#855')
}
}
if (id + 7 <= 64) {
if (($('#' + (id + 7)).attr('class')).slice(11, 12) == 'b' && Math.floor((id + 14) / 8) == row + 1) {
placeHighlights(id + 7, '#855')
}
}
}
}
//knight highlighting
if (pieceType == 'knight') {
let knight = [6, 10, 15, 17]
let krows = [1, 1, 2, 2]
knight.forEach(function(i) {
if (Math.floor((id + 7 + i) / 8) == row + krows[knight.indexOf(i)] && id + i <= 64) {
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id + i), '#855')
}
if (($('#' + (id + i)).attr('class')).slice(12) == '') {
placeHighlights((id + i), '#885')
}
}
if (Math.floor((id + 7 - i) / 8) == row - krows[knight.indexOf(i)] && id - i > 0) {
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id - i), '#855')
}
if (($('#' + (id - i)).attr('class')).slice(12) == '') {
placeHighlights((id - i), '#885')
}
}
})
}
//bishop highlighting
if (pieceType == 'bishop' || pieceType == 'queen') {
for (let a = 1; a < 8; a++) {
let i = a * 9
if (id + i <= 64 && Math.floor((id + 7 + i) / 8) == row + a) {
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id + i), '#855')
break;
}
if (($('#' + (id + i)).attr('class')).slice(12) == '') {
placeHighlights((id + i), '#885')
} else break;
}
}
for (let a = 1; a < 8; a++) {
let i = a * 9
if (id - i > 0 && Math.floor((id + 7 - i) / 8) == row - a) {
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id - i), '#855')
break;
}
if (($('#' + (id - i)).attr('class')).slice(12) == '') {
placeHighlights((id - i), '#885')
} else break;
}
}
for (let a = 1; a < 8; a++) {
let i = a * 7
if (id + i <= 64 && Math.floor((id + 7 + i) / 8) == row + a) {
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id + i), '#855')
break;
}
if (($('#' + (id + i)).attr('class')).slice(12) == '') {
placeHighlights((id + i), '#885')
} else break;
}
}
for (let a = 1; a < 8; a++) {
let i = a * 7
if (id - i > 0 && Math.floor((id + 7 - i) / 8) == row - a) {
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id - i), '#855')
break;
}
if (($('#' + (id - i)).attr('class')).slice(12) == '') {
placeHighlights((id - i), '#885')
} else break;
}
}
}
//rook highlighting
if (pieceType == 'rook' || pieceType == 'queen') {
//right
for (let i = 1; i <= 7; i++) {
if (Math.floor((id + 7 + i) / 8) != row) break;
if (id + i > 64) break;
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id + i), '#855')
break;
}
if (($('#' + (id + i)).attr('class')).slice(11, 12) == pieceColor && ($('#' + (id + i)).attr('class')).slice(12) == 'king' && pieceType == 'rook' && moved.includes(id) == false) {
placeHighlights((id + i), '#658')
}
if (($('#' + (id + i)).attr('class')).slice(12) == '') {
placeHighlights((id + i), '#885')
} else break;
}
//left
for (let i = 1; i <= 7; i++) {
if (Math.floor((id + 7 - i) / 8) != row) break;
if (id - i <= 0) break;
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id - i), '#855')
break;
}
if (($('#' + (id - i)).attr('class')).slice(11, 12) == pieceColor && ($('#' + (id - i)).attr('class')).slice(12) == 'king' && pieceType == 'rook' && moved.includes(id) == false) {
placeHighlights((id - i), '#658')
}
if (($('#' + (id - i)).attr('class')).slice(12) == '' && Math.floor((id + 7 - i) / 8) == row) {
placeHighlights((id - i), '#885')
} else break;
}
//down
for (let a = 1; a <= 7; a++) {
let b = a * 8
if (id + b > 64) break;
if (($('#' + (id + b)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + b)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id + b), '#855')
break;
}
if (($('#' + (id + b)).attr('class')).slice(12) == '') {
placeHighlights((id + b), '#885')
} else break;
}
//up
for (let a = 1; a <= 7; a++) {
let b = a * 8
if (id - b <= 0) break;
if (($('#' + (id - b)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - b)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id - b), '#855')
break;
}
if (($('#' + (id - b)).attr('class')).slice(12) == '') {
placeHighlights((id - b), '#885')
} else break;
}
}
//king highlighting
if (pieceType == 'king' || pieceType == 'queen') {
if (pieceType == 'king') {
for (let i = 1; i <= 7; i++) {
if (Math.floor((id + 7 + i) / 8) != row) break;
if (id + i > 64) break;
if (($('#' + (id + i)).attr('class')).slice(11, 12) == pieceColor && ($('#' + (id + i)).attr('class')).slice(12) == 'rook' && moved.includes(id) == false && moved.includes(5) == false) {
placeHighlights((id + i), '#658')
} else if (($('#' + (id + i)).attr('class')).slice(12) != '') break;
}
//left
for (let i = 1; i <= 7; i++) {
if (Math.floor((id + 7 - i) / 8) != row) break;
if (id - i <= 0) break;
if (($('#' + (id - i)).attr('class')).slice(11, 12) == pieceColor && ($('#' + (id - i)).attr('class')).slice(12) == 'rook' && moved.includes(id) == false && moved.includes(5) == false) {
placeHighlights((id - i), '#658')
} else if (($('#' + (id - i)).attr('class')).slice(12) != '') break;
}
}
let king = [-9, -8, -7, -1, 1, 7, 8, 9]
king.forEach(function(i) {
if (id + i <= 0 || id + i > 64) return;
if (i < -5 && Math.floor((id + 7 + i) / 8) != row - 1) return;
if (i == -1 || i == 1)
if (Math.floor((id + 7 + i) / 8) != row) return;
if (i > 5 && Math.floor((id + 7 + i) / 8) != row + 1) return
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
placeHighlights((id + i), '#855')
} else if (($('#' + (id + i)).attr('class')).slice(12) == '') {
placeHighlights((id + i), '#885')
} else return;
})
}
moddedLogic(pieceType, pieceColor, id, row, column)
}
function checkForCheck(pieceType, id, pieceColor) {
let row = Math.floor((id + 7) / 8);
let column = id % 8
let res = []
//pawn highlighting
if (pieceType == 'pawn') {
if (pieceColor == 'b') {
if (id - 9 > 0) {
if (($('#' + (id - 9)).attr('class')).slice(12) != '' && Math.floor((id - 2) / 8) == row - 1 && ($('#' + (id - 9)).attr('class')).slice(11, 12) == 'w') {
res.push(id - 9)
}
}
if (id - 7 > 0) {
if (($('#' + (id - 7)).attr('class')).slice(12) != '' && Math.floor((id) / 8) == row - 1 && ($('#' + (id - 7)).attr('class')).slice(11, 12) == 'w') {
res.push(id - 7)
}
}
}
if (pieceColor == 'w') {
if (id + 9 <= 64) {
if (($('#' + (id + 9)).attr('class')).slice(12) != '' && Math.floor((id + 16) / 8) == row + 1 && ($('#' + (id + 9)).attr('class')).slice(11, 12) == 'b') {
res.push(id + 9)
}
}
if (id + 7 <= 64) {
if (($('#' + (id + 7)).attr('class')).slice(12) != '' && Math.floor((id + 14) / 8) == row + 1 && ($('#' + (id + 7)).attr('class')).slice(11, 12) == 'b') {
res.push(id + 7)
}
}
}
}
//knight highlighting
if (pieceType == 'knight') {
let knight = [6, 10, 15, 17]
let krows = [1, 1, 2, 2]
knight.forEach(function(i) {
if (Math.floor((id + 7 + i) / 8) == row + krows[knight.indexOf(i)] && id + i <= 64) {
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id + i)
}
} else if (Math.floor((id + 7 - i) / 8) == row - krows[knight.indexOf(i)] && id - i > 0) {
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id - i)
}
}
})
}
//bishop highlighting
if (pieceType == 'bishop' || pieceType == 'queen') {
for (let a = 1; a < 8; a++) {
let i = a * 9
if (id + i <= 64 && Math.floor((id + 7 + i) / 8) == row + a) {
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id + i)
break;
} else break;
}
}
for (let a = 1; a < 8; a++) {
let i = a * 9
if (id - i > 0 && Math.floor((id + 7 - i) / 8) == row - a) {
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id - i)
break;
} else break;
}
}
for (let a = 1; a < 8; a++) {
let i = a * 7
if (id + i <= 64 && Math.floor((id + 7 + i) / 8) == row + a) {
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id + i)
break;
} else break;
}
}
for (let a = 1; a < 8; a++) {
let i = a * 7
if (id - i > 0 && Math.floor((id + 7 - i) / 8) == row - a) {
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id - i)
break;
} else break;
}
}
}
//rook highlighting
if (pieceType == 'rook' || pieceType == 'queen') {
//right
for (let i = 1; i <= 7; i++) {
if (Math.floor((id + 7 + i) / 8) != row) break;
if (id + i > 64) break;
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id + i)
}
break;
}
//left
for (let i = 1; i <= 7; i++) {
if (Math.floor((id + 7 - i) / 8) != row) break;
if (id - i <= 0) break;
if (($('#' + (id - i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id - i)
}
break;
}
//down
for (let a = 1; a <= 7; a++) {
let b = a * 8
if (id + b > 64) break;
if (($('#' + (id + b)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + b)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id + b)
}
break;
}
//up
for (let a = 1; a <= 7; a++) {
let b = a * 8
if (id - b <= 0) break;
if (($('#' + (id - b)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id - b)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id - b)
}
break;
}
}
//king highlighting
if (pieceType == 'king' || pieceType == 'queen') {
let king = [-9, -8, -7, -1, 1, 7, 8, 9]
king.forEach(function(i) {
if (id + i <= 0 || id + i > 64) return;
if (i < -5 && Math.floor((id + 7 + i) / 8) != row - 1) return;
if (i == -1 || i == 1)
if (Math.floor((id + 7 + i) / 8) != row) return;
if (i > 5 && Math.floor((id + 7 + i) / 8) != row + 1) return
if (($('#' + (id + i)).attr('class')).slice(11, 12) == 'w' && pieceColor == 'b' || ($('#' + (id + i)).attr('class')).slice(11, 12) == 'b' && pieceColor == 'w') {
res.push(id + i)
} else return;
})
}
//Debug
/* for (let i = 0; i <= res.length; i++) {
if (res[i - 1] != undefined) $('#' + res[i - 1]).css('background-color', 'blue');
} */
res.push(moddedCheckLogic(pieceType, pieceColor, id, row, column))
return res;
}
function placeHighlights(id, color) {
if (color != '#777') {
selectedpiece.takeables.push(id);
}
if (color == '#885' && $('#' + id).css('background-color') == 'rgb(85, 85, 85)') {
$('#' + id).css('background-color', '#996')
}
if (color == '#885' && $('#' + id).css('background-color') == 'rgb(51, 51, 51)') {
$('#' + id).css('background-color', '#774')
} else $('#' + id).css('background-color', color)
selectedpiece.takeables.sort(function(a, b) {
return a - b
})
}
$('#reset').click(function() {
turn = 'w'
for (let i = 1; i <= 64; i++) {
removePieceImage(i + "i")
appendPieceImage(($('#' + i).attr('class')).slice(11), i, i + "i")
$('#' + i).removeClass(($('#' + i).attr('class')).slice(11, 12) + ($('#' + i).attr('class')).slice(12))
}
blackKing = 61
whiteKing = 5
setBoard(defaultBoard)
moddedReset()
})
//https://stackoverflow.com/a/37819523/17670831
function appendPieceImage(imageSource, containerId, imageId) {
if (pieces[imageSource] != undefined) imageSource = pieces[imageSource]
else return;
var img = document.createElement("IMG");
img.src = path + imageSource;
img.setAttribute('id', imageId);
document.getElementById(containerId).appendChild(img);
return imageId;
}
function removePieceImage(imageId) {
var elementToBeRemoved = document.getElementById(imageId);
if (elementToBeRemoved == undefined) return;
elementToBeRemoved.parentElement.removeChild(elementToBeRemoved);
}
//Mod Support
const welcomeMessage = '===========================\nWelcome to my Chess Game!\nSince you opened console, im going to assume you know what your doing.\nCommands:\nsetPos(pieceType, pieceColor, id)\nsetBoard(board)\ngetBoard()\n==========================='
console.log(welcomeMessage)
function setPos(pieceType, pieceColor, id) {
$('#' + id).removeClass(($('#' + id).attr('class')).slice(11))
$('#' + id).addClass(pieceColor + pieceType)
drawBoard()
}
function getBoard() {
let res = []
for (let i = 1; i <= 64; i++) {
res.push(($('#' + i).attr('class')).slice(11))
}
console.log('Board Data: ' + res)
}
function setBoard(value) {
if (value == 'blank') {
for (let i = 1; i <= 64; i++) {
$('#' + i).removeClass(($('#' + i).attr('class')).slice(11))
}
drawBoard()
} else {
console.log(value)
let board = value.split(',')
console.log(board)
for (let i = 1; i <= 64; i++) {
$('#' + i).removeClass(($('#' + i).attr('class')).slice(11))
$('#' + i).addClass(board[i - 1])
}
drawBoard()
}
}
function moddedLogic(pieceType, pieceColor, id, row, column) {
//There aren't any mods in the base game
}
function moddedCheckLogic(pieceType, pieceColor, id, row, column) {
//There aren't any mods in the base game
}
function moddedReset() {
//Still no mods in the base game
}
function playSound(sound) {
let audio = new Audio(`https://github.com/WaffleDevs/Online-Chess/blob/main/${sound}.mp3?raw=true`);
//let audio = new Audio(`file:///home/chronos/u-4d897f5d8e182b99966fd73a4aa007b239388756/MyFiles/Downloads/p2p/${sound}.mp3`);
audio.play();
}
var lastPeerId = null;
var peer = null; // own peer object
var conn = null;
let connectButton = document.getElementById("connect-button")
let recvIdInput = document.getElementById("receiver-id")
/**
* Create the Peer object for our end of the connection.
*
* Sets up callbacks that handle any events related to our
* peer object.
*/
function initialize() {
// Create own peer object with connection to shared PeerJS server
let chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
let password = ''
for (var i = 0; i < 4; i++) {
password = password + chars[Math.floor(Math.random()*52)]
}
peer = new Peer(password, {
debug: 2
});
peer.on('open', function (id) {
// Workaround for peer.reconnect deleting previous id
if (peer.id === null) {
console.log('Received null id from peer open');
peer.id = lastPeerId;
} else {
lastPeerId = peer.id;
}
console.log('ID: ' + peer.id);
});
peer.on('connection', function (c) {
// Disallow incoming connections
c.on('open', function() {
c.send("Sender does not accept incoming connections");
setTimeout(function() { c.close(); }, 500);
});
//ready()
});
peer.on('disconnected', function () {
console.log('Connection lost. Please reconnect');
// Workaround for peer.reconnect deleting previous id
peer.id = lastPeerId;
peer._lastServerId = lastPeerId;
peer.reconnect();
});
peer.on('close', function() {
conn = null;
status.innerHTML = "Connection destroyed. Please refresh";
console.log('Connection destroyed');
});
peer.on('error', function (err) {
console.log(err);
alert('' + err);
});
};
/**
* Create the connection between the two Peers.
*
* Sets up callbacks that handle any events related to the
* connection and data received on it.
*/
function join() {
// Close old connection
if (conn) {
conn.close();
}
// Create connection to destination peer specified in the input field
conn = peer.connect(recvIdInput.value, {
reliable: true
});
conn.on('open', function () {
alert('Connected!')
});
// Handle incoming data (messages only since this is the signal sender)
conn.on('data', function (data) {
playSound('move-self')
let value = `${data}`.split(';')
console.log(data)
turn = value[1]
whiteKing = value[2]
blackKing = value[3]
console.log(value[4])
if(value[4]) moved = value[4].split(',')
let board = value[0].split(',')
console.log(board)
for (let i = 1; i <= 64; i++) {
$('#' + i).removeClass(($('#' + i).attr('class')).slice(11))
$('#' + i).addClass(board[i - 1])
}
movedPiece[0] = value[5]
movedPiece[1] = value[6]
drawBoard()
});
conn.on('close', function () {
status.innerHTML = "Connection closed";
});
};
/**
* Get first "GET style" parameter from href.
* This enables delivering an initial command upon page load.
*
* Would have been easier to use location.hash.
*/
function getUrlParam(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if (results == null)
return null;
else
return results[1];
};
// // Listen for enter in message box
// sendMessageBox.addEventListener('keypress', function (e) {
// var event = e || window.event;
// var char = event.which || event.keyCode;
// if (char == '13')
// sendButton.click();
// });
// // Send message
// sendButton.addEventListener('click', function () {
// if (conn && conn.open) {
// var msg = sendMessageBox.value;
// sendMessageBox.value = "";
// conn.send(msg);
// console.log("Sent: " + msg);
// addMessage("<span class=\"selfMsg\">Self: </span> " + msg);
// } else {
// console.log('Connection is closed');
// }
// });
// Start peer connection on click
connectButton.addEventListener('click', join);
// Since all our callbacks are setup, start the process of obtaining an ID
initialize();