Diff

Differences From Artifact [d3e0f89ba2]:

To Artifact [2a9ccd023c]:


61
62
63
64
65
66
67
68
69


70
71
72
73
74
75
76
61
62
63
64
65
66
67


68
69
70
71
72
73
74
75
76







-
-
+
+







global tDim = 16
global cDim = 12
global sDim = 9
global mDim = 5
global dim = 16

global moveChoice = Array{Int64}(8)
global tempMoveChoice1 = Array{Int64}(8)
global tempMoveChoice2 = Array{Int64}(8) # Only used for double captures
#global tempMoveChoice1 = Array{Int64}(8)
#global tempMoveChoice2 = Array{Int64}(8) # Only used for double captures
global strength
global whitePrison = []
global blackPrison = []
global chessboard
global tempChessboard

type moveOffset
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
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







-
-
-
-
+
+
+
+





-
+





-
+





+
+
+
-
+



+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


-
+

-
+

-
-
-
+
+
+

-
+

-
+







-
-
-
+
+
+

-
+

-
+








-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-







-
+
+




-
+




+


+






+
+
+
+
+
+
+
+
+
+
+

-
+

-
+




















-
+
+







	end
	if captured.name == defKing # gamewin
		push!(capturedArray, captured.name)
		return true
	elseif captured.name == defGGen # Does not promote
		push!(capturedArray, captured.name)
		return false
	elseif 65 <= UInt32(captured.name) <= 90
		captured.name += 32 # Demote captured piece.
		push!(capturedArray, captured.name)
		return false
	#elseif 65 <= UInt32(captured.name) <= 90
	#	captured.name += 32 # Demote captured piece.
	#	push!(capturedArray, captured.name)
	#	return false
	end
	return false
end

# Copy move into moveChoice if it is better
function demonBurn(destRow::Int64, destCol::Int64)
function demonBurn(destRow::Int64, destCol::Int64, temp::Int64)
	for i in 1:9
		tempRow = destRow + moveOption[i].row
		tempCol = destCol + moveOption[i].col
		if tempRow <= dim && tempRow >= 1 && tempCol <= dim && tempCol >= 1
			if chessboard[tempRow, tempCol].side != defDummy && chessboard[srcRow, srcCol].side != chessboard[tempRow, tempCol].side
				temp += pieceValTen[chessboard[tempRow, tempCol].name] - pieceValTen[chessboard[srcRow, srcCol].name]
				temp += pieceValTen[chessboard[tempRow, tempCol].name]
			end
		end
	end
	return temp
end

# tempMoveChoice[1] is going to store the type of attack, 1 = single capture, 2 = double capture, 3 = vice general/fire demon
# Have not coded changing capturing chessboard
function capture(srcRow::Int64, srcCol::Int64, destRow::Int64, destCol::Int64)
function capture(tempMoveChoice)
	global strength
	global moveChoice
	temp = 0
	if tempMoveChoice[1] == 1
		a = 4
		b = 5
		if dim == tDdim
			temp = pieceValTen[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
			if chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defFireDemon
				temp = demonBurn(tempMoveChoice[a], tempMoveChoice[b], temp)
			end		
		elseif dim == cDim
			temp = pieceValChu[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
		else
			temp = pieceVal[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
		end
		if chessboard[tempMoveChoice[a], tempMoveChoice[b]].side == defWhite # check if attack is safe
	if chessboard[destRow, destCol].side != defDummy && chessboard[srcRow, srcCol].side != chessboard[destRow, destCol].side
		if dim == tDdim
			temp = pieceValTen[chessboard[destRow, destCol].name] - pieceValTen[chessboard[srcRow, srcCol].name]
			if chessboard[srcRow, srcCol].name == defFireDemon
				demonBurn(destRow, destCol)
			if chessboard[tempMoveChoice[a], tempMoveChoice[b]].WAttack == 0
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == tDim
					temp += 600
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == cDim
					temp += 91
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing
					temp += 68
				elseif dim == tDim
					temp += 500
				else
					temp += 50
				end
			end
		elseif chessboard[tempMoveChoice[a], tempMoveChoice[b]].side == defBlack
			if chessboard[tempMoveChoice[a], tempMoveChoice[b]].BAttack == 0
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == tDim
					temp += 600
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == cDim
					temp += 91
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing
					temp += 68
				elseif dim == tDim
					temp += 500
				else
					temp += 50
				end
			end
		end
	elseif tempMoveChoice[1] == 2
		a = 4
		b = 5
		while a != 0 && b != 0
			if dim == tDdim
				if temp == 0
					temp = pieceValTen[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
				else
					temp += pieceValTen[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name]	
			elseif dim == cDim
				if temp == 0
					temp = pieceValChu[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
				else
					temp += pieceValChu[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name]
			else
				if temp == 0
					temp = pieceVal[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
				else
					temp += pieceVal[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name]
				end
			end
			if chessboard[tempMoveChoice[a], tempMoveChoice[b]].side == defWhite # check if attack is safe
				if chessboard[tempMoveChoice[a], tempMoveChoice[b]].WAttack == 0
					elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == tDim
						temp += 600
					elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == cDim
						temp += 91
					elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing
						temp += 68
					elseif dim == tDim
						temp += 500
					else
						temp += 50
					end
				end
			elseif chessboard[tempMoveChoice[a], tempMoveChoice[b]].side == defBlack
				if chessboard[tempMoveChoice[a], tempMoveChoice[b]].BAttack == 0
					elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == tDim
						temp += 600
					elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == cDim
						temp += 91
					elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing
						temp += 68
					elseif dim == tDim
						temp += 500
					else
						temp += 50
					end
				end
			end
			a += 2
			b += 2
		end
	elseif tempMoveChoice[1] == 3
		a = 8
		b = 9
		while tempMoveChoice[a] == 0 && tempMoveChoice [b] == 0
			a -= 2
			a -= 2
		end
		if dim == tDdim
			temp = pieceValTen[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
			if chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defFireDemon
				temp = demonBurn(tempMoveChoice[a], tempMoveChoice[b], temp)
			end		
		elseif dim == cDim
			temp = pieceValChu[chessboard[destRow, destCol].name] - pieceValChu[chessboard[srcRow, srcCol].name]
			temp = pieceValChu[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
		else
			temp = pieceVal[chessboard[destRow, destCol].name] - pieceVal[chessboard[srcRow, srcCol].name]
			temp = pieceVal[chessboard[tempMoveChoice[a], tempMoveChoice[b]].name] - pieceValTen[chessboard[tempMoveChoice[2], tempMoveChoice[3]].name]
		end
		if chessboard[destRow, destCol].side == defWhite # check if attack is safe
			if chessboard[destRow, destCol].WAttack == 0
				elseif chessboard[srcRow, srcCol].name == defKing && dim == tDim
		if chessboard[tempMoveChoice[a], tempMoveChoice[b]].side == defWhite # check if attack is safe
			if chessboard[tempMoveChoice[a], tempMoveChoice[b]].WAttack == 0
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == tDim
					temp += 600
				elseif chessboard[srcRow, srcCol].name == defKing && dim == cDim
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == cDim
					temp += 91
				elseif chessboard[srcRow, srcCol].name == defKing
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing
					temp += 68
				elseif dim == tDim
					temp += 500
				else
					temp += 50
				end
			end
		elseif chessboard[destRow, destCol].side == defBlack
			if chessboard[destRow, destCol].BAttack == 0
				elseif chessboard[srcRow, srcCol].name == defKing && dim == tDim
		elseif chessboard[tempMoveChoice[a], tempMoveChoice[b]].side == defBlack
			if chessboard[tempMoveChoice[a], tempMoveChoice[b]].BAttack == 0
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == tDim
					temp += 600
				elseif chessboard[srcRow, srcCol].name == defKing && dim == cDim
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing && dim == cDim
					temp += 91
				elseif chessboard[srcRow, srcCol].name == defKing
				elseif chessboard[tempMoveChoice[2], tempMoveChoice[3]].name == defKing
					temp += 68
				elseif dim == tDim
					temp += 500
				else
					temp += 50
				end
			end
		end
		tempMoveChoice = [srcRow, srcCol, destRow, destCol, 0, 0, 0, 0] # Store the move
		if temp > strength
			strength = temp
			moveChoice = deepcopy(tempMoveChoice)
			println(strength)
			println(moveChoice)
		end
	end
	end
	if temp > strength
		storeMoveChoice = [tempMoveChoice[2], tempMoveChoice[3], tempMoveChoice[4], tempMoveChoice[5], tempMoveChoice[6], tempMoveChoice[7], tempMoveChoice[8], tempMoveChoice[9]]
		strength = temp
		moveChoice = deepcopy(tempMoveChoice)
		println(strength)
		println(moveChoice)
	end
end
end


function step(srcRow::Int64, srcCol::Int64, option::String, destRow::Int64, destCol::Int64)
	if destRow <= dim && destRow >= 1 && destCol <= dim && destCol >= 1
		if option == "update"
			update(srcRow, srcCol, destRow, destCol, option)
		end
		if option == "capture"
			capture(srcRow, srcCol, destRow, destCol, option)
			tempMoveChoice = [1, srcRow, srcCol, destRow, destCol, 0, 0, 0, 0]
			capture(tempMoveChoice)
		end
	end
end

function stepMultiple(srcRow::Int64, srcCol::Int64, option::String, tempRow::Int64, tempCol::Int64, jumps::Int64)
function stepMultiple(srcRow::Int64, srcCol::Int64, option::String, tempRow::Int64, tempCol::Int64, jumps::Int64, tempMoveChoice)
	global tempChessboard
	if jumps == 0
		return
	end
	saveMoveChoice = tempMoveChoice
	for i in 1:9
		if i != 5
			tempMoveChoice = saveMoveChoice
			newTempRow = tempRow + moveOption[i].row
			newTempCol = tempCol + moveOption[i].col
			if newTempRow <= dim && newTempRow >= 1 && newTempCol <= dim && newTempCol >= 1
				if option == "special update" || option == "demon update"
					update(srcRow, srcCol, newTempRow, newTempCol, option)
				end
				if option == "capture"
					a = 4
					b = 5
					while tempMoveChoice[a] == 0 && tempMoveChoice[b] == 0
						a += 2
						b += 2
					end
					tempMoveChoice[a] = newTempRow
					tempMoveChoice[b] = newTempCol
					capture(tempMoveChoice)
				end
				if chessboard[srcRow, srcCol].name == defLion || chessboard[srcRow, srcCol].name == defLionHawk
					stepMultiple(srcRow, srcCol, option, newTempRow, newTempCol, jumps - 1)
					stepMultiple(srcRow, srcCol, option, newTempRow, newTempCol, jumps - 1, tempMoveChoice)
				elseif chessboard[newTempRow, newTempCol].side == defDummy
					stepMultiple(srcRow, srcCol, option, newTempRow, newTempCol, jumps - 1)
					stepMultiple(srcRow, srcCol, option, newTempRow, newTempCol, jumps - 1, tempMoveChoice)
				end
			end
		end
	end
end

function rangeJump(srcRow::Int64, srcCol::Int64, option::String, index::Int64)
	tempRow = srcRow
	tempCol = srcCol
	while true
		tempRow = tempRow + moveOption[index].row
		tempCol = tempCol + moveOption[index].col
		if tempRow > dim || tempRow < 1 || tempCol > dim || tempCol < 1
			break
		end
		if option == "update" || option == "special update"
			update(srcRow, srcCol, tempRow, tempCol, option)
		end
		if chessboard[tempRow, tempCol].side != defDummy
			if option == "capture"
				capture(srcRow, srcCol, tempRow, tempCol, option)
				tempMoveChoice = [1, srcRow, srcCol, destRow, destCol, 0, 0, 0, 0]
				capture(tempMoveChoice)
			end
		end	
		if rangeJumpPriority[chessboard[srcRow, srcCol].name] < rangeJumpPriority[chessboard[tempRow, tempCol].name] # Not jumpable
			break
		end	
	end
end
414
415
416
417
418
419
420
421


422
423
424
425
426
427
428
532
533
534
535
536
537
538

539
540
541
542
543
544
545
546
547







-
+
+







			break
		end
		if option == "update" || option == "special update" || option == "demon update"
			update(srcRow, srcCol, newTempRow, newTempCol, option)
		end
		if chessboard[newTempRow, newTempCol].side != defDummy
			if option == "capture"
				capture(srcRow, srcCol, tempRow, tempCol, option)
				tempMoveChoice = [1, srcRow, srcCol, destRow, destCol, 0, 0, 0, 0]
				capture(tempMoveChoice)
			end
			break
		end
	end
end

function defKingMove(srcRow::Int64, srcCol::Int64, option::String)
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
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







-
+









-
-
-
-
-
-
-
+
+
+
+
+
+
+
-











-
-
-
-
-
-
-
-
-
-
-







			step(srcRow, srcCol, option, srcRow + moveOption[i].row, srcCol + moveOption[i].col)
		end
	end
end

function defViceGeneralMove(srcRow::Int64, srcCol::Int64, option::String)
	global tempChessboard
	if option == "update" || option == "capture"
	if option == "update"
		option = "special update"
		tempChessboard = deepcopy(chessboard)
		for i in 1:dim
			for j in 1:dim
				tempChessboard[i, j].WAttack = 0
				tempChessboard[i, j].BAttack = 0
			end
		end
	end
	if option != "capture"
		for i in 1:9
			if i == 1 || i == 3 || i == 7 || i == 9
				rangeJump(srcRow, srcCol, option, i)
			end
		end
		stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 3)
	for i in 1:9
		if i == 1 || i == 3 || i == 7 || i == 9
			rangeJump(srcRow, srcCol, option, i)
		end
	end
	tempMoveChoice = [3, srcRow, srcCol, 0, 0, 0, 0, 0, 0]
	stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 3, tempMoveChoice)
	end
	if option == "special update"
		for i in 1:dim
			for j in 1:dim
				if i == srcRow && j == srcCol
				elseif chessboard[srcRow, srcCol].side == defWhite && tempChessboard[i, j].WAttack >= 1
					chessboard[i, j].WAttack += 1
				elseif chessboard[srcRow, srcCol].side == defBlack && tempChessboard[i, j].BAttack >= 1
					chessboard[i, j].BAttack += 1
				end
			end
		end
	elseif option == "capture"
		for i in 1:dim
			for j in 1:dim
				if i == srcRow && j == srcCol
				elseif chessboard[srcRow, srcCol].side == defWhite && tempChessboard[i, j].WAttack >= 1
					capture(srcRow, srcCol, i, j)
				elseif chessboard[srcRow, srcCol].side == defBlack && tempChessboard[i, j].BAttack >= 1
					capture(srcRow, srcCol, i, j)
				end
			end
		end
	end
end
	
function defGreatGeneralMove(srcRow::Int64, srcCol::Int64, option::String)
	for i in 1:9
		if i != 5
			rangeJump(srcRow, srcCol, option, i)
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
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







-
-
+



-
+
-

+
+











-
-
-
-
-
-
-
-
-
-
-







		for i in 1:dim
			for j in 1:dim
				tempChessboard[i, j].WAttack = 0
				tempChessboard[i, j].BAttack = 0
			end
		end
	end
	if option != "capture"
		for i in 1:9
	for i in 1:9
			if i != 2 && i != 5 && i != 8
				range(srcRow, srcCol, option, srcRow, srcCol, i)
			end
		end	
		end
		stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 3)
	end
	tempMoveChoice = [3, srcRow, srcCol, 0, 0, 0, 0, 0, 0]
	stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 3, tempMoveChoice)
	if option == "demon update"
		for i in 1:dim
			for j in 1:dim
				if i == srcRow && j == srcCol
				elseif chessboard[srcRow, srcCol].side == defWhite && tempChessboard[i, j].WAttack >= 1
					chessboard[i, j].WAttack += 1
				elseif chessboard[srcRow, srcCol].side == defBlack && tempChessboard[i, j].BAttack >= 1
					chessboard[i, j].BAttack += 1
				end
			end
		end
	elseif option == "capture"
		for i in 1:dim
			for j in 1:dim
				if i == srcRow && j == srcCol
				elseif chessboard[srcRow, srcCol].side == defWhite && tempChessboard[i, j].WAttack >= 1
					capture(srcRow, srcCol, i, j)
				elseif chessboard[srcRow, srcCol].side == defBlack && tempChessboard[i, j].BAttack >= 1
					capture(srcRow, srcCol, i, j)
				end
			end
		end
	end
end

function defHeavenlyTetrarchMove(srcRow::Int64, srcCol::Int64, option::String) # Need Exceptions
	for i in 1:9
		if i != 5
			step(srcRow, srcCol, option, srcRow + moveOption[i].row, srcCol + moveOption[i].col)
775
776
777
778
779
780
781

782

783
784
785
786
787
788
789
871
872
873
874
875
876
877
878

879
880
881
882
883
884
885
886







+
-
+







				tempChessboard[i, j].BAttack = 0
			end
		end
	end
	if option == "update"
		option = "special update"
	end
	tempMoveChoice = [2, srcRow, srcCol, 0, 0, 0, 0, 0, 0]
	stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 2)
	stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 2, tempMoveChoice)
	for i in 1:9
		if i == 1 || i == 3 || i == 7 || i == 9
			range(srcRow, srcCol, option, srcRow, srcCol, i)
		end
	end
	if option == "special update"
		for i in 1:dim
816
817
818
819
820
821
822

823

824
825
826
827
828
829
830
913
914
915
916
917
918
919
920

921
922
923
924
925
926
927
928







+
-
+







		for i in 1:dim
			for j in 1:dim
				tempChessboard[i, j].WAttack = 0
				tempChessboard[i, j].BAttack = 0
			end
		end
	end
	tempMoveChoice = [2, srcRow, srcCol, 0, 0, 0, 0, 0, 0]
	stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 2)
	stepMultiple(srcRow, srcCol, option, srcRow, srcCol, 2, tempMoveChoice)
	if option == "special update"
		for i in 1:dim
			for j in 1:dim
				if i == srcRow && j == srcCol
				elseif chessboard[srcRow, srcCol].side == defWhite && tempChessboard[i, j].WAttack >= 1
					chessboard[i, j].WAttack += 1
				elseif chessboard[srcRow, srcCol].side == defBlack && tempChessboard[i, j].BAttack >= 1