@@ -543,105 +543,105 @@ bool is_26_connected(
543
543
if (x < 0 ) {
544
544
if (y < 0 ) {
545
545
if (z < 0 ) {
546
- return (candidate & 0b10000000 ) && ( center & 0b00000001 );
546
+ return (( candidate & 0b10000000 ) > 0 ) & (( center & 0b00000001 ) > 0 );
547
547
}
548
548
else if (z == 0 ) {
549
- return (candidate & 0b10001000 ) && ( center & 0b00010001 );
549
+ return (( candidate & 0b10001000 ) > 0 ) & (( center & 0b00010001 ) > 0 );
550
550
}
551
551
else {
552
- return (candidate & 0b00001000 ) && ( center & 0b00010000 );
552
+ return (( candidate & 0b00001000 ) > 0 ) & (( center & 0b00010000 ) > 0 );
553
553
}
554
554
}
555
555
else if (y == 0 ) {
556
556
if (z < 0 ) {
557
- return (candidate & 0b10100000 ) && ( center & 0b00000101 );
557
+ return (( candidate & 0b10100000 ) > 0 ) & (( center & 0b00000101 ) > 0 );
558
558
}
559
559
else if (z == 0 ) {
560
- return (candidate & 0b10101010 ) && ( center & 0b01010101 );
560
+ return (( candidate & 0b10101010 ) > 0 ) & (( center & 0b01010101 ) > 0 );
561
561
}
562
562
else {
563
- return (candidate & 0b00001010 ) && ( center & 0b01010000 );
563
+ return (( candidate & 0b00001010 ) > 0 ) & (( center & 0b01010000 ) > 0 );
564
564
}
565
565
}
566
566
else {
567
567
if (z < 0 ) {
568
- return (candidate & 0b00100000 ) && ( center & 0b00000100 );
568
+ return (( candidate & 0b00100000 ) > 0 ) & (( center & 0b00000100 ) > 0 );
569
569
}
570
570
else if (z == 0 ) {
571
- return (candidate & 0b00100010 ) && ( center & 0b01000010 );
571
+ return (( candidate & 0b00100010 ) > 0 ) & (( center & 0b01000010 ) > 0 );
572
572
}
573
573
else {
574
- return (candidate & 0b00000010 ) && ( center & 0b01000000 );
574
+ return (( candidate & 0b00000010 ) > 0 ) & (( center & 0b01000000 ) > 0 );
575
575
}
576
576
}
577
577
}
578
578
else if (x == 0 ) {
579
579
if (y < 0 ) {
580
580
if (z < 0 ) {
581
- return (candidate & 0b11000000 ) && ( center & 0b00000011 );
581
+ return (( candidate & 0b11000000 ) > 0 ) & (( center & 0b00000011 ) > 0 );
582
582
}
583
583
else if (z == 0 ) {
584
- return (candidate & 0b11001100 ) && ( center & 0b00110011 );
584
+ return (( candidate & 0b11001100 ) > 0 ) & (( center & 0b00110011 ) > 0 );
585
585
}
586
586
else {
587
- return (candidate & 0b00001100 ) && ( center & 0b00110000 );
587
+ return (( candidate & 0b00001100 ) > 0 ) & (( center & 0b00110000 ) > 0 );
588
588
}
589
589
}
590
590
else if (y == 0 ) {
591
591
if (z < 0 ) {
592
- return (candidate & 0b11110000 ) && ( center & 0b00001111 );
592
+ return (( candidate & 0b11110000 ) > 0 ) & (( center & 0b00001111 ) > 0 );
593
593
}
594
594
else if (z == 0 ) {
595
595
return true ;
596
596
}
597
- else {
598
- return (candidate & 0b00001111 ) && ( center & 0b11110000 );
597
+ else {
598
+ return (( candidate & 0b00001111 ) > 0 ) & (( center & 0b11110000 ) > 0 );
599
599
}
600
600
}
601
601
else {
602
602
if (z < 0 ) {
603
- return (candidate & 0b00110000 ) && ( center & 0b00001100 );
603
+ return (( candidate & 0b00110000 ) > 0 ) & (( center & 0b00001100 ) > 0 );
604
604
}
605
605
else if (z == 0 ) {
606
- return (candidate & 0b00110011 ) && ( center & 0b11001100 );
606
+ return (( candidate & 0b00110011 ) > 0 ) & (( center & 0b11001100 ) > 0 );
607
607
}
608
608
else {
609
- return (candidate & 0b00000011 ) && ( center & 0b11000000 );
609
+ return (( candidate & 0b00000011 ) > 0 ) & (( center & 0b11000000 ) > 0 );
610
610
}
611
611
}
612
612
}
613
613
else {
614
614
if (y < 0 ) {
615
615
if (z < 0 ) {
616
- return (candidate & 0b01000000 ) && ( center & 0b00000010 );
616
+ return (( candidate & 0b01000000 ) > 0 ) & (( center & 0b00000010 ) > 0 );
617
617
}
618
618
else if (z == 0 ) {
619
- return (candidate & 0b01000100 ) && ( center & 0b00100010 );
619
+ return (( candidate & 0b01000100 ) > 0 ) & (( center & 0b00100010 ) > 0 );
620
620
}
621
621
else {
622
- return (candidate & 0b00000100 ) && ( center & 0b00100000 );
622
+ return (( candidate & 0b00000100 ) > 0 ) & (( center & 0b00100000 ) > 0 );
623
623
}
624
624
}
625
625
else if (y == 0 ) {
626
626
if (z < 0 ) {
627
- return (candidate & 0b01010000 ) && ( center & 0b00001010 );
627
+ return (( candidate & 0b01010000 ) > 0 ) & (( center & 0b00001010 ) > 0 );
628
628
}
629
629
else if (z == 0 ) {
630
- return (candidate & 0b01010101 ) && ( center & 0b10101010 );
630
+ return (( candidate & 0b01010101 ) > 0 ) & (( center & 0b10101010 ) > 0 );
631
631
}
632
632
else {
633
- return (candidate & 0b00000101 ) && ( center & 0b10100000 );
633
+ return (( candidate & 0b00000101 ) > 0 ) & (( center & 0b10100000 ) > 0 );
634
634
}
635
635
}
636
636
else {
637
637
if (z < 0 ) {
638
- return (candidate & 0b00010000 ) && ( center & 0b00001000 );
638
+ return (( candidate & 0b00010000 ) > 0 ) & (( center & 0b00001000 ) > 0 );
639
639
}
640
640
else if (z == 0 ) {
641
- return (candidate & 0b00010001 ) && ( center & 0b10001000 );
641
+ return (( candidate & 0b00010001 ) > 0 ) & (( center & 0b10001000 ) > 0 );
642
642
}
643
643
else {
644
- return (candidate & 0b00000001 ) && ( center & 0b10000000 );
644
+ return (( candidate & 0b00000001 ) > 0 ) & (( center & 0b10000000 ) > 0 );
645
645
}
646
646
}
647
647
}
0 commit comments