How to use isBlack method in Cypress

Best JavaScript code snippet using cypress

defaultPuzzle.js

Source:defaultPuzzle.js Github

copy

Full Screen

1export const DEFAULT_PUZZLE = {2 width: 15,3 height: 15,4 grid: [5 [6 {7 solution: { content: 'T', isBlack: false, number: '1' },8 isBlack: false,9 content: '',10 number: '',11 wasChecked: false,12 wasRevealed: false,13 circle: false,14 },15 {16 solution: { content: 'A', isBlack: false, number: '2' },17 isBlack: false,18 content: '',19 number: '',20 wasChecked: false,21 wasRevealed: false,22 circle: false,23 },24 {25 solution: { content: 'M', isBlack: false, number: '3' },26 isBlack: false,27 content: '',28 number: '',29 wasChecked: false,30 wasRevealed: false,31 circle: false,32 },33 {34 solution: { content: 'P', isBlack: false, number: '4' },35 isBlack: false,36 content: '',37 number: '',38 wasChecked: false,39 wasRevealed: false,40 circle: false,41 },42 {43 solution: { content: 'S', isBlack: false, number: '5' },44 isBlack: false,45 content: '',46 number: '',47 wasChecked: false,48 wasRevealed: false,49 circle: false,50 },51 {52 solution: { content: '', isBlack: true, number: '' },53 isBlack: false,54 content: '',55 number: '',56 wasChecked: false,57 wasRevealed: false,58 circle: false,59 },60 {61 solution: { content: 'M', isBlack: false, number: '6' },62 isBlack: false,63 content: '',64 number: '',65 wasChecked: false,66 wasRevealed: false,67 circle: false,68 },69 {70 solution: { content: 'L', isBlack: false, number: '7' },71 isBlack: false,72 content: '',73 number: '',74 wasChecked: false,75 wasRevealed: false,76 circle: false,77 },78 {79 solution: { content: 'S', isBlack: false, number: '8' },80 isBlack: false,81 content: '',82 number: '',83 wasChecked: false,84 wasRevealed: false,85 circle: false,86 },87 {88 solution: { content: '', isBlack: true, number: '' },89 isBlack: false,90 content: '',91 number: '',92 wasChecked: false,93 wasRevealed: false,94 circle: false,95 },96 {97 solution: { content: 'I', isBlack: false, number: '9' },98 isBlack: false,99 content: '',100 number: '',101 wasChecked: false,102 wasRevealed: false,103 circle: false,104 },105 {106 solution: { content: 'N', isBlack: false, number: '10' },107 isBlack: false,108 content: '',109 number: '',110 wasChecked: false,111 wasRevealed: false,112 circle: false,113 },114 {115 solution: { content: 'T', isBlack: false, number: '11' },116 isBlack: false,117 content: '',118 number: '',119 wasChecked: false,120 wasRevealed: false,121 circle: false,122 },123 {124 solution: { content: 'O', isBlack: false, number: '12' },125 isBlack: false,126 content: '',127 number: '',128 wasChecked: false,129 wasRevealed: false,130 circle: false,131 },132 {133 solution: { content: 'W', isBlack: false, number: '13' },134 isBlack: false,135 content: '',136 number: '',137 wasChecked: false,138 wasRevealed: false,139 circle: false,140 },141 ],142 [143 {144 solution: { content: 'I', isBlack: false, number: '14' },145 isBlack: false,146 content: '',147 number: '',148 wasChecked: false,149 wasRevealed: false,150 circle: false,151 },152 {153 solution: { content: 'C', isBlack: false, number: '' },154 isBlack: false,155 content: '',156 number: '',157 wasChecked: false,158 wasRevealed: false,159 circle: false,160 },161 {162 solution: { content: 'O', isBlack: false, number: '' },163 isBlack: false,164 content: '',165 number: '',166 wasChecked: false,167 wasRevealed: false,168 circle: false,169 },170 {171 solution: { content: 'U', isBlack: false, number: '' },172 isBlack: false,173 content: '',174 number: '',175 wasChecked: false,176 wasRevealed: false,177 circle: false,178 },179 {180 solution: { content: 'L', isBlack: false, number: '' },181 isBlack: false,182 content: '',183 number: '',184 wasChecked: false,185 wasRevealed: false,186 circle: false,187 },188 {189 solution: { content: 'D', isBlack: false, number: '15' },190 isBlack: false,191 content: '',192 number: '',193 wasChecked: false,194 wasRevealed: false,195 circle: false,196 },197 {198 solution: { content: 'E', isBlack: false, number: '' },199 isBlack: false,200 content: '',201 number: '',202 wasChecked: false,203 wasRevealed: false,204 circle: false,205 },206 {207 solution: { content: 'A', isBlack: false, number: '' },208 isBlack: false,209 content: '',210 number: '',211 wasChecked: false,212 wasRevealed: false,213 circle: false,214 },215 {216 solution: { content: 'T', isBlack: false, number: '' },217 isBlack: false,218 content: '',219 number: '',220 wasChecked: false,221 wasRevealed: false,222 circle: false,223 },224 {225 solution: { content: '', isBlack: true, number: '' },226 isBlack: false,227 content: '',228 number: '',229 wasChecked: false,230 wasRevealed: false,231 circle: false,232 },233 {234 solution: { content: 'D', isBlack: false, number: '16' },235 isBlack: false,236 content: '',237 number: '',238 wasChecked: false,239 wasRevealed: false,240 circle: false,241 },242 {243 solution: { content: 'I', isBlack: false, number: '' },244 isBlack: false,245 content: '',246 number: '',247 wasChecked: false,248 wasRevealed: false,249 circle: false,250 },251 {252 solution: { content: 'A', isBlack: false, number: '' },253 isBlack: false,254 content: '',255 number: '',256 wasChecked: false,257 wasRevealed: false,258 circle: false,259 },260 {261 solution: { content: 'N', isBlack: false, number: '' },262 isBlack: false,263 content: '',264 number: '',265 wasChecked: false,266 wasRevealed: false,267 circle: false,268 },269 {270 solution: { content: 'A', isBlack: false, number: '' },271 isBlack: false,272 content: '',273 number: '',274 wasChecked: false,275 wasRevealed: false,276 circle: false,277 },278 ],279 [280 {281 solution: { content: 'L', isBlack: false, number: '17' },282 isBlack: false,283 content: '',284 number: '',285 wasChecked: false,286 wasRevealed: false,287 circle: false,288 },289 {290 solution: { content: 'O', isBlack: false, number: '' },291 isBlack: false,292 content: '',293 number: '',294 wasChecked: false,295 wasRevealed: false,296 circle: false,297 },298 {299 solution: { content: 'O', isBlack: false, number: '' },300 isBlack: false,301 content: '',302 number: '',303 wasChecked: false,304 wasRevealed: false,305 circle: false,306 },307 {308 solution: { content: 'K', isBlack: false, number: '' },309 isBlack: false,310 content: '',311 number: '',312 wasChecked: false,313 wasRevealed: false,314 circle: false,315 },316 {317 solution: { content: 'I', isBlack: false, number: '' },318 isBlack: false,319 content: '',320 number: '',321 wasChecked: false,322 wasRevealed: false,323 circle: false,324 },325 {326 solution: { content: 'N', isBlack: false, number: '' },327 isBlack: false,328 content: '',329 number: '',330 wasChecked: false,331 wasRevealed: false,332 circle: false,333 },334 {335 solution: { content: 'G', isBlack: false, number: '' },336 isBlack: false,337 content: '',338 number: '',339 wasChecked: false,340 wasRevealed: false,341 circle: false,342 },343 {344 solution: { content: 'U', isBlack: false, number: '' },345 isBlack: false,346 content: '',347 number: '',348 wasChecked: false,349 wasRevealed: false,350 circle: false,351 },352 {353 solution: { content: 'P', isBlack: false, number: '' },354 isBlack: false,355 content: '',356 number: '',357 wasChecked: false,358 wasRevealed: false,359 circle: false,360 },361 {362 solution: { content: '', isBlack: true, number: '' },363 isBlack: false,364 content: '',365 number: '',366 wasChecked: false,367 wasRevealed: false,368 circle: false,369 },370 {371 solution: { content: 'L', isBlack: false, number: '18' },372 isBlack: false,373 content: '',374 number: '',375 wasChecked: false,376 wasRevealed: false,377 circle: false,378 },379 {380 solution: { content: 'A', isBlack: false, number: '' },381 isBlack: false,382 content: '',383 number: '',384 wasChecked: false,385 wasRevealed: false,386 circle: false,387 },388 {389 solution: { content: 'B', isBlack: false, number: '' },390 isBlack: false,391 content: '',392 number: '',393 wasChecked: false,394 wasRevealed: false,395 circle: false,396 },397 {398 solution: { content: 'E', isBlack: false, number: '' },399 isBlack: false,400 content: '',401 number: '',402 wasChecked: false,403 wasRevealed: false,404 circle: false,405 },406 {407 solution: { content: 'L', isBlack: false, number: '' },408 isBlack: false,409 content: '',410 number: '',411 wasChecked: false,412 wasRevealed: false,413 circle: false,414 },415 ],416 [417 {418 solution: { content: 'D', isBlack: false, number: '19' },419 isBlack: false,420 content: '',421 number: '',422 wasChecked: false,423 wasRevealed: false,424 circle: false,425 },426 {427 solution: { content: 'R', isBlack: false, number: '' },428 isBlack: false,429 content: '',430 number: '',431 wasChecked: false,432 wasRevealed: false,433 circle: false,434 },435 {436 solution: { content: 'E', isBlack: false, number: '' },437 isBlack: false,438 content: '',439 number: '',440 wasChecked: false,441 wasRevealed: false,442 circle: false,443 },444 {445 solution: { content: 'A', isBlack: false, number: '' },446 isBlack: false,447 content: '',448 number: '',449 wasChecked: false,450 wasRevealed: false,451 circle: false,452 },453 {454 solution: { content: 'M', isBlack: false, number: '' },455 isBlack: false,456 content: '',457 number: '',458 wasChecked: false,459 wasRevealed: false,460 circle: false,461 },462 {463 solution: { content: 'C', isBlack: false, number: '' },464 isBlack: false,465 content: '',466 number: '',467 wasChecked: false,468 wasRevealed: false,469 circle: false,470 },471 {472 solution: { content: 'A', isBlack: false, number: '' },473 isBlack: false,474 content: '',475 number: '',476 wasChecked: false,477 wasRevealed: false,478 circle: false,479 },480 {481 solution: { content: 'R', isBlack: false, number: '' },482 isBlack: false,483 content: '',484 number: '',485 wasChecked: false,486 wasRevealed: false,487 circle: false,488 },489 {490 solution: { content: '', isBlack: true, number: '' },491 isBlack: false,492 content: '',493 number: '',494 wasChecked: false,495 wasRevealed: false,496 circle: false,497 },498 {499 solution: { content: 'W', isBlack: false, number: '20' },500 isBlack: false,501 content: '',502 number: '',503 wasChecked: false,504 wasRevealed: false,505 circle: false,506 },507 {508 solution: { content: 'E', isBlack: false, number: '' },509 isBlack: false,510 content: '',511 number: '',512 wasChecked: false,513 wasRevealed: false,514 circle: false,515 },516 {517 solution: { content: 'L', isBlack: false, number: '' },518 isBlack: false,519 content: '',520 number: '',521 wasChecked: false,522 wasRevealed: false,523 circle: false,524 },525 {526 solution: { content: 'L', isBlack: false, number: '' },527 isBlack: false,528 content: '',529 number: '',530 wasChecked: false,531 wasRevealed: false,532 circle: false,533 },534 {535 solution: { content: 'O', isBlack: false, number: '' },536 isBlack: false,537 content: '',538 number: '',539 wasChecked: false,540 wasRevealed: false,541 circle: false,542 },543 {544 solution: { content: 'K', isBlack: false, number: '' },545 isBlack: false,546 content: '',547 number: '',548 wasChecked: false,549 wasRevealed: false,550 circle: false,551 },552 ],553 [554 {555 solution: { content: 'E', isBlack: false, number: '21' },556 isBlack: false,557 content: '',558 number: '',559 wasChecked: false,560 wasRevealed: false,561 circle: false,562 },563 {564 solution: { content: 'N', isBlack: false, number: '' },565 isBlack: false,566 content: '',567 number: '',568 wasChecked: false,569 wasRevealed: false,570 circle: false,571 },572 {573 solution: { content: 'D', isBlack: false, number: '' },574 isBlack: false,575 content: '',576 number: '',577 wasChecked: false,578 wasRevealed: false,579 circle: false,580 },581 {582 solution: { content: 'S', isBlack: false, number: '' },583 isBlack: false,584 content: '',585 number: '',586 wasChecked: false,587 wasRevealed: false,588 circle: false,589 },590 {591 solution: { content: '', isBlack: true, number: '' },592 isBlack: false,593 content: '',594 number: '',595 wasChecked: false,596 wasRevealed: false,597 circle: false,598 },599 {600 solution: { content: '', isBlack: true, number: '' },601 isBlack: false,602 content: '',603 number: '',604 wasChecked: false,605 wasRevealed: false,606 circle: false,607 },608 {609 solution: { content: '', isBlack: true, number: '' },610 isBlack: false,611 content: '',612 number: '',613 wasChecked: false,614 wasRevealed: false,615 circle: false,616 },617 {618 solution: { content: 'A', isBlack: false, number: '22' },619 isBlack: false,620 content: '',621 number: '',622 wasChecked: false,623 wasRevealed: false,624 circle: false,625 },626 {627 solution: { content: 'G', isBlack: false, number: '23' },628 isBlack: false,629 content: '',630 number: '',631 wasChecked: false,632 wasRevealed: false,633 circle: false,634 },635 {636 solution: { content: 'E', isBlack: false, number: '' },637 isBlack: false,638 content: '',639 number: '',640 wasChecked: false,641 wasRevealed: false,642 circle: false,643 },644 {645 solution: { content: '', isBlack: true, number: '' },646 isBlack: false,647 content: '',648 number: '',649 wasChecked: false,650 wasRevealed: false,651 circle: false,652 },653 {654 solution: { content: 'L', isBlack: false, number: '24' },655 isBlack: false,656 content: '',657 number: '',658 wasChecked: false,659 wasRevealed: false,660 circle: false,661 },662 {663 solution: { content: 'E', isBlack: false, number: '' },664 isBlack: false,665 content: '',666 number: '',667 wasChecked: false,668 wasRevealed: false,669 circle: false,670 },671 {672 solution: { content: 'N', isBlack: false, number: '' },673 isBlack: false,674 content: '',675 number: '',676 wasChecked: false,677 wasRevealed: false,678 circle: false,679 },680 {681 solution: { content: 'O', isBlack: false, number: '' },682 isBlack: false,683 content: '',684 number: '',685 wasChecked: false,686 wasRevealed: false,687 circle: false,688 },689 ],690 [691 {692 solution: { content: '', isBlack: true, number: '' },693 isBlack: false,694 content: '',695 number: '',696 wasChecked: false,697 wasRevealed: false,698 circle: false,699 },700 {701 solution: { content: '', isBlack: true, number: '' },702 isBlack: false,703 content: '',704 number: '',705 wasChecked: false,706 wasRevealed: false,707 circle: false,708 },709 {710 solution: { content: '', isBlack: true, number: '' },711 isBlack: false,712 content: '',713 number: '',714 wasChecked: false,715 wasRevealed: false,716 circle: false,717 },718 {719 solution: { content: 'H', isBlack: false, number: '25' },720 isBlack: false,721 content: '',722 number: '',723 wasChecked: false,724 wasRevealed: false,725 circle: false,726 },727 {728 solution: { content: 'A', isBlack: false, number: '26' },729 isBlack: false,730 content: '',731 number: '',732 wasChecked: false,733 wasRevealed: false,734 circle: false,735 },736 {737 solution: { content: 'M', isBlack: false, number: '27' },738 isBlack: false,739 content: '',740 number: '',741 wasChecked: false,742 wasRevealed: false,743 circle: false,744 },745 {746 solution: { content: 'S', isBlack: false, number: '28' },747 isBlack: false,748 content: '',749 number: '',750 wasChecked: false,751 wasRevealed: false,752 circle: false,753 },754 {755 solution: { content: '', isBlack: true, number: '' },756 isBlack: false,757 content: '',758 number: '',759 wasChecked: false,760 wasRevealed: false,761 circle: false,762 },763 {764 solution: { content: 'R', isBlack: false, number: '29' },765 isBlack: false,766 content: '',767 number: '',768 wasChecked: false,769 wasRevealed: false,770 circle: false,771 },772 {773 solution: { content: 'E', isBlack: false, number: '' },774 isBlack: false,775 content: '',776 number: '',777 wasChecked: false,778 wasRevealed: false,779 circle: false,780 },781 {782 solution: { content: 'C', isBlack: false, number: '30' },783 isBlack: false,784 content: '',785 number: '',786 wasChecked: false,787 wasRevealed: false,788 circle: false,789 },790 {791 solution: { content: '', isBlack: true, number: '' },792 isBlack: false,793 content: '',794 number: '',795 wasChecked: false,796 wasRevealed: false,797 circle: false,798 },799 {800 solution: { content: 'L', isBlack: false, number: '31' },801 isBlack: false,802 content: '',803 number: '',804 wasChecked: false,805 wasRevealed: false,806 circle: false,807 },808 {809 solution: { content: 'O', isBlack: false, number: '' },810 isBlack: false,811 content: '',812 number: '',813 wasChecked: false,814 wasRevealed: false,815 circle: false,816 },817 {818 solution: { content: 'U', isBlack: false, number: '' },819 isBlack: false,820 content: '',821 number: '',822 wasChecked: false,823 wasRevealed: false,824 circle: false,825 },826 ],827 [828 {829 solution: { content: '', isBlack: true, number: '' },830 isBlack: false,831 content: '',832 number: '',833 wasChecked: false,834 wasRevealed: false,835 circle: false,836 },837 {838 solution: { content: '', isBlack: true, number: '' },839 isBlack: false,840 content: '',841 number: '',842 wasChecked: false,843 wasRevealed: false,844 circle: false,845 },846 {847 solution: { content: 'M', isBlack: false, number: '32' },848 isBlack: false,849 content: '',850 number: '',851 wasChecked: false,852 wasRevealed: false,853 circle: false,854 },855 {856 solution: { content: 'E', isBlack: false, number: '' },857 isBlack: false,858 content: '',859 number: '',860 wasChecked: false,861 wasRevealed: false,862 circle: false,863 },864 {865 solution: { content: 'T', isBlack: false, number: '' },866 isBlack: false,867 content: '',868 number: '',869 wasChecked: false,870 wasRevealed: false,871 circle: false,872 },873 {874 solution: { content: 'O', isBlack: false, number: '' },875 isBlack: false,876 content: '',877 number: '',878 wasChecked: false,879 wasRevealed: false,880 circle: false,881 },882 {883 solution: { content: 'O', isBlack: false, number: '' },884 isBlack: false,885 content: '',886 number: '',887 wasChecked: false,888 wasRevealed: false,889 circle: false,890 },891 {892 solution: { content: 'M', isBlack: false, number: '33' },893 isBlack: false,894 content: '',895 number: '',896 wasChecked: false,897 wasRevealed: false,898 circle: false,899 },900 {901 solution: { content: 'O', isBlack: false, number: '' },902 isBlack: false,903 content: '',904 number: '',905 wasChecked: false,906 wasRevealed: false,907 circle: false,908 },909 {910 solution: { content: 'V', isBlack: false, number: '' },911 isBlack: false,912 content: '',913 number: '',914 wasChecked: false,915 wasRevealed: false,916 circle: false,917 },918 {919 solution: { content: 'E', isBlack: false, number: '' },920 isBlack: false,921 content: '',922 number: '',923 wasChecked: false,924 wasRevealed: false,925 circle: false,926 },927 {928 solution: { content: 'M', isBlack: false, number: '34' },929 isBlack: false,930 content: '',931 number: '',932 wasChecked: false,933 wasRevealed: false,934 circle: false,935 },936 {937 solution: { content: 'E', isBlack: false, number: '' },938 isBlack: false,939 content: '',940 number: '',941 wasChecked: false,942 wasRevealed: false,943 circle: false,944 },945 {946 solution: { content: 'N', isBlack: false, number: '' },947 isBlack: false,948 content: '',949 number: '',950 wasChecked: false,951 wasRevealed: false,952 circle: false,953 },954 {955 solution: { content: 'T', isBlack: false, number: '' },956 isBlack: false,957 content: '',958 number: '',959 wasChecked: false,960 wasRevealed: false,961 circle: false,962 },963 ],964 [965 {966 solution: { content: '', isBlack: true, number: '' },967 isBlack: false,968 content: '',969 number: '',970 wasChecked: false,971 wasRevealed: false,972 circle: false,973 },974 {975 solution: { content: 'M', isBlack: false, number: '35' },976 isBlack: false,977 content: '',978 number: '',979 wasChecked: false,980 wasRevealed: false,981 circle: false,982 },983 {984 solution: { content: 'A', isBlack: false, number: '' },985 isBlack: false,986 content: '',987 number: '',988 wasChecked: false,989 wasRevealed: false,990 circle: false,991 },992 {993 solution: { content: 'L', isBlack: false, number: '' },994 isBlack: false,995 content: '',996 number: '',997 wasChecked: false,998 wasRevealed: false,999 circle: false,1000 },1001 {1002 solution: { content: 'E', isBlack: false, number: '' },1003 isBlack: false,1004 content: '',1005 number: '',1006 wasChecked: false,1007 wasRevealed: false,1008 circle: false,1009 },1010 {1011 solution: { content: 'P', isBlack: false, number: '' },1012 isBlack: false,1013 content: '',1014 number: '',1015 wasChecked: false,1016 wasRevealed: false,1017 circle: false,1018 },1019 {1020 solution: { content: 'R', isBlack: false, number: '' },1021 isBlack: false,1022 content: '',1023 number: '',1024 wasChecked: false,1025 wasRevealed: false,1026 circle: false,1027 },1028 {1029 solution: { content: 'I', isBlack: false, number: '' },1030 isBlack: false,1031 content: '',1032 number: '',1033 wasChecked: false,1034 wasRevealed: false,1035 circle: false,1036 },1037 {1038 solution: { content: 'V', isBlack: false, number: '' },1039 isBlack: false,1040 content: '',1041 number: '',1042 wasChecked: false,1043 wasRevealed: false,1044 circle: false,1045 },1046 {1047 solution: { content: 'I', isBlack: false, number: '' },1048 isBlack: false,1049 content: '',1050 number: '',1051 wasChecked: false,1052 wasRevealed: false,1053 circle: false,1054 },1055 {1056 solution: { content: 'L', isBlack: false, number: '' },1057 isBlack: false,1058 content: '',1059 number: '',1060 wasChecked: false,1061 wasRevealed: false,1062 circle: false,1063 },1064 {1065 solution: { content: 'E', isBlack: false, number: '' },1066 isBlack: false,1067 content: '',1068 number: '',1069 wasChecked: false,1070 wasRevealed: false,1071 circle: false,1072 },1073 {1074 solution: { content: 'G', isBlack: false, number: '' },1075 isBlack: false,1076 content: '',1077 number: '',1078 wasChecked: false,1079 wasRevealed: false,1080 circle: false,1081 },1082 {1083 solution: { content: 'E', isBlack: false, number: '' },1084 isBlack: false,1085 content: '',1086 number: '',1087 wasChecked: false,1088 wasRevealed: false,1089 circle: false,1090 },1091 {1092 solution: { content: '', isBlack: true, number: '' },1093 isBlack: false,1094 content: '',1095 number: '',1096 wasChecked: false,1097 wasRevealed: false,1098 circle: false,1099 },1100 ],1101 [1102 {1103 solution: { content: 'B', isBlack: false, number: '36' },1104 isBlack: false,1105 content: '',1106 number: '',1107 wasChecked: false,1108 wasRevealed: false,1109 circle: false,1110 },1111 {1112 solution: { content: 'I', isBlack: false, number: '' },1113 isBlack: false,1114 content: '',1115 number: '',1116 wasChecked: false,1117 wasRevealed: false,1118 circle: false,1119 },1120 {1121 solution: { content: 'G', isBlack: false, number: '' },1122 isBlack: false,1123 content: '',1124 number: '',1125 wasChecked: false,1126 wasRevealed: false,1127 circle: false,1128 },1129 {1130 solution: { content: 'L', isBlack: false, number: '' },1131 isBlack: false,1132 content: '',1133 number: '',1134 wasChecked: false,1135 wasRevealed: false,1136 circle: false,1137 },1138 {1139 solution: { content: 'I', isBlack: false, number: '' },1140 isBlack: false,1141 content: '',1142 number: '',1143 wasChecked: false,1144 wasRevealed: false,1145 circle: false,1146 },1147 {1148 solution: { content: 'T', isBlack: false, number: '' },1149 isBlack: false,1150 content: '',1151 number: '',1152 wasChecked: false,1153 wasRevealed: false,1154 circle: false,1155 },1156 {1157 solution: { content: 'T', isBlack: false, number: '' },1158 isBlack: false,1159 content: '',1160 number: '',1161 wasChecked: false,1162 wasRevealed: false,1163 circle: false,1164 },1165 {1166 solution: { content: 'L', isBlack: false, number: '' },1167 isBlack: false,1168 content: '',1169 number: '',1170 wasChecked: false,1171 wasRevealed: false,1172 circle: false,1173 },1174 {1175 solution: { content: 'E', isBlack: false, number: '' },1176 isBlack: false,1177 content: '',1178 number: '',1179 wasChecked: false,1180 wasRevealed: false,1181 circle: false,1182 },1183 {1184 solution: { content: 'L', isBlack: false, number: '' },1185 isBlack: false,1186 content: '',1187 number: '',1188 wasChecked: false,1189 wasRevealed: false,1190 circle: false,1191 },1192 {1193 solution: { content: 'I', isBlack: false, number: '' },1194 isBlack: false,1195 content: '',1196 number: '',1197 wasChecked: false,1198 wasRevealed: false,1199 circle: false,1200 },1201 {1202 solution: { content: 'E', isBlack: false, number: '' },1203 isBlack: false,1204 content: '',1205 number: '',1206 wasChecked: false,1207 wasRevealed: false,1208 circle: false,1209 },1210 {1211 solution: { content: 'S', isBlack: false, number: '' },1212 isBlack: false,1213 content: '',1214 number: '',1215 wasChecked: false,1216 wasRevealed: false,1217 circle: false,1218 },1219 {1220 solution: { content: '', isBlack: true, number: '' },1221 isBlack: false,1222 content: '',1223 number: '',1224 wasChecked: false,1225 wasRevealed: false,1226 circle: false,1227 },1228 {1229 solution: { content: '', isBlack: true, number: '' },1230 isBlack: false,1231 content: '',1232 number: '',1233 wasChecked: false,1234 wasRevealed: false,1235 circle: false,1236 },1237 ],1238 [1239 {1240 solution: { content: 'A', isBlack: false, number: '37' },1241 isBlack: false,1242 content: '',1243 number: '',1244 wasChecked: false,1245 wasRevealed: false,1246 circle: false,1247 },1248 {1249 solution: { content: 'N', isBlack: false, number: '' },1250 isBlack: false,1251 content: '',1252 number: '',1253 wasChecked: false,1254 wasRevealed: false,1255 circle: false,1256 },1257 {1258 solution: { content: 'I', isBlack: false, number: '' },1259 isBlack: false,1260 content: '',1261 number: '',1262 wasChecked: false,1263 wasRevealed: false,1264 circle: false,1265 },1266 {1267 solution: { content: '', isBlack: true, number: '' },1268 isBlack: false,1269 content: '',1270 number: '',1271 wasChecked: false,1272 wasRevealed: false,1273 circle: false,1274 },1275 {1276 solution: { content: 'T', isBlack: false, number: '38' },1277 isBlack: false,1278 content: '',1279 number: '',1280 wasChecked: false,1281 wasRevealed: false,1282 circle: false,1283 },1284 {1285 solution: { content: 'O', isBlack: false, number: '' },1286 isBlack: false,1287 content: '',1288 number: '',1289 wasChecked: false,1290 wasRevealed: false,1291 circle: false,1292 },1293 {1294 solution: { content: 'E', isBlack: false, number: '' },1295 isBlack: false,1296 content: '',1297 number: '',1298 wasChecked: false,1299 wasRevealed: false,1300 circle: false,1301 },1302 {1303 solution: { content: '', isBlack: true, number: '' },1304 isBlack: false,1305 content: '',1306 number: '',1307 wasChecked: false,1308 wasRevealed: false,1309 circle: false,1310 },1311 {1312 solution: { content: 'L', isBlack: false, number: '39' },1313 isBlack: false,1314 content: '',1315 number: '',1316 wasChecked: false,1317 wasRevealed: false,1318 circle: false,1319 },1320 {1321 solution: { content: 'S', isBlack: false, number: '' },1322 isBlack: false,1323 content: '',1324 number: '',1325 wasChecked: false,1326 wasRevealed: false,1327 circle: false,1328 },1329 {1330 solution: { content: 'A', isBlack: false, number: '' },1331 isBlack: false,1332 content: '',1333 number: '',1334 wasChecked: false,1335 wasRevealed: false,1336 circle: false,1337 },1338 {1339 solution: { content: 'T', isBlack: false, number: '' },1340 isBlack: false,1341 content: '',1342 number: '',1343 wasChecked: false,1344 wasRevealed: false,1345 circle: false,1346 },1347 {1348 solution: { content: '', isBlack: true, number: '' },1349 isBlack: false,1350 content: '',1351 number: '',1352 wasChecked: false,1353 wasRevealed: false,1354 circle: false,1355 },1356 {1357 solution: { content: '', isBlack: true, number: '' },1358 isBlack: false,1359 content: '',1360 number: '',1361 wasChecked: false,1362 wasRevealed: false,1363 circle: false,1364 },1365 {1366 solution: { content: '', isBlack: true, number: '' },1367 isBlack: false,1368 content: '',1369 number: '',1370 wasChecked: false,1371 wasRevealed: false,1372 circle: false,1373 },1374 ],1375 [1376 {1377 solution: { content: 'R', isBlack: false, number: '40' },1378 isBlack: false,1379 content: '',1380 number: '',1381 wasChecked: false,1382 wasRevealed: false,1383 circle: false,1384 },1385 {1386 solution: { content: 'I', isBlack: false, number: '' },1387 isBlack: false,1388 content: '',1389 number: '',1390 wasChecked: false,1391 wasRevealed: false,1392 circle: false,1393 },1394 {1395 solution: { content: 'C', isBlack: false, number: '' },1396 isBlack: false,1397 content: '',1398 number: '',1399 wasChecked: false,1400 wasRevealed: false,1401 circle: false,1402 },1403 {1404 solution: { content: 'A', isBlack: false, number: '41' },1405 isBlack: false,1406 content: '',1407 number: '',1408 wasChecked: false,1409 wasRevealed: false,1410 circle: false,1411 },1412 {1413 solution: { content: '', isBlack: true, number: '' },1414 isBlack: false,1415 content: '',1416 number: '',1417 wasChecked: false,1418 wasRevealed: false,1419 circle: false,1420 },1421 {1422 solution: { content: 'P', isBlack: false, number: '42' },1423 isBlack: false,1424 content: '',1425 number: '',1426 wasChecked: false,1427 wasRevealed: false,1428 circle: false,1429 },1430 {1431 solution: { content: 'D', isBlack: false, number: '' },1432 isBlack: false,1433 content: '',1434 number: '',1435 wasChecked: false,1436 wasRevealed: false,1437 circle: false,1438 },1439 {1440 solution: { content: 'A', isBlack: false, number: '43' },1441 isBlack: false,1442 content: '',1443 number: '',1444 wasChecked: false,1445 wasRevealed: false,1446 circle: false,1447 },1448 {1449 solution: { content: '', isBlack: true, number: '' },1450 isBlack: false,1451 content: '',1452 number: '',1453 wasChecked: false,1454 wasRevealed: false,1455 circle: false,1456 },1457 {1458 solution: { content: '', isBlack: true, number: '' },1459 isBlack: false,1460 content: '',1461 number: '',1462 wasChecked: false,1463 wasRevealed: false,1464 circle: false,1465 },1466 {1467 solution: { content: '', isBlack: true, number: '' },1468 isBlack: false,1469 content: '',1470 number: '',1471 wasChecked: false,1472 wasRevealed: false,1473 circle: false,1474 },1475 {1476 solution: { content: 'C', isBlack: false, number: '44' },1477 isBlack: false,1478 content: '',1479 number: '',1480 wasChecked: false,1481 wasRevealed: false,1482 circle: false,1483 },1484 {1485 solution: { content: 'O', isBlack: false, number: '45' },1486 isBlack: false,1487 content: '',1488 number: '',1489 wasChecked: false,1490 wasRevealed: false,1491 circle: false,1492 },1493 {1494 solution: { content: 'S', isBlack: false, number: '46' },1495 isBlack: false,1496 content: '',1497 number: '',1498 wasChecked: false,1499 wasRevealed: false,1500 circle: false,1501 },1502 {1503 solution: { content: 'I', isBlack: false, number: '47' },1504 isBlack: false,1505 content: '',1506 number: '',1507 wasChecked: false,1508 wasRevealed: false,1509 circle: false,1510 },1511 ],1512 [1513 {1514 solution: { content: 'I', isBlack: false, number: '48' },1515 isBlack: false,1516 content: '',1517 number: '',1518 wasChecked: false,1519 wasRevealed: false,1520 circle: false,1521 },1522 {1523 solution: { content: 'M', isBlack: false, number: '' },1524 isBlack: false,1525 content: '',1526 number: '',1527 wasChecked: false,1528 wasRevealed: false,1529 circle: false,1530 },1531 {1532 solution: { content: 'A', isBlack: false, number: '' },1533 isBlack: false,1534 content: '',1535 number: '',1536 wasChecked: false,1537 wasRevealed: false,1538 circle: false,1539 },1540 {1541 solution: { content: 'G', isBlack: false, number: '' },1542 isBlack: false,1543 content: '',1544 number: '',1545 wasChecked: false,1546 wasRevealed: false,1547 circle: false,1548 },1549 {1550 solution: { content: 'E', isBlack: false, number: '49' },1551 isBlack: false,1552 content: '',1553 number: '',1554 wasChecked: false,1555 wasRevealed: false,1556 circle: false,1557 },1558 {1559 solution: { content: 'S', isBlack: false, number: '' },1560 isBlack: false,1561 content: '',1562 number: '',1563 wasChecked: false,1564 wasRevealed: false,1565 circle: false,1566 },1567 {1568 solution: { content: '', isBlack: true, number: '' },1569 isBlack: false,1570 content: '',1571 number: '',1572 wasChecked: false,1573 wasRevealed: false,1574 circle: false,1575 },1576 {1577 solution: { content: 'G', isBlack: false, number: '50' },1578 isBlack: false,1579 content: '',1580 number: '',1581 wasChecked: false,1582 wasRevealed: false,1583 circle: false,1584 },1585 {1586 solution: { content: 'A', isBlack: false, number: '51' },1587 isBlack: false,1588 content: '',1589 number: '',1590 wasChecked: false,1591 wasRevealed: false,1592 circle: false,1593 },1594 {1595 solution: { content: 'N', isBlack: false, number: '52' },1596 isBlack: false,1597 content: '',1598 number: '',1599 wasChecked: false,1600 wasRevealed: false,1601 circle: false,1602 },1603 {1604 solution: { content: 'G', isBlack: false, number: '53' },1605 isBlack: false,1606 content: '',1607 number: '',1608 wasChecked: false,1609 wasRevealed: false,1610 circle: false,1611 },1612 {1613 solution: { content: 'U', isBlack: false, number: '' },1614 isBlack: false,1615 content: '',1616 number: '',1617 wasChecked: false,1618 wasRevealed: false,1619 circle: false,1620 },1621 {1622 solution: { content: 'P', isBlack: false, number: '' },1623 isBlack: false,1624 content: '',1625 number: '',1626 wasChecked: false,1627 wasRevealed: false,1628 circle: false,1629 },1630 {1631 solution: { content: 'O', isBlack: false, number: '' },1632 isBlack: false,1633 content: '',1634 number: '',1635 wasChecked: false,1636 wasRevealed: false,1637 circle: false,1638 },1639 {1640 solution: { content: 'N', isBlack: false, number: '' },1641 isBlack: false,1642 content: '',1643 number: '',1644 wasChecked: false,1645 wasRevealed: false,1646 circle: false,1647 },1648 ],1649 [1650 {1651 solution: { content: 'L', isBlack: false, number: '54' },1652 isBlack: false,1653 content: '',1654 number: '',1655 wasChecked: false,1656 wasRevealed: false,1657 circle: false,1658 },1659 {1660 solution: { content: 'O', isBlack: false, number: '' },1661 isBlack: false,1662 content: '',1663 number: '',1664 wasChecked: false,1665 wasRevealed: false,1666 circle: false,1667 },1668 {1669 solution: { content: 'C', isBlack: false, number: '' },1670 isBlack: false,1671 content: '',1672 number: '',1673 wasChecked: false,1674 wasRevealed: false,1675 circle: false,1676 },1677 {1678 solution: { content: 'A', isBlack: false, number: '' },1679 isBlack: false,1680 content: '',1681 number: '',1682 wasChecked: false,1683 wasRevealed: false,1684 circle: false,1685 },1686 {1687 solution: { content: 'L', isBlack: false, number: '' },1688 isBlack: false,1689 content: '',1690 number: '',1691 wasChecked: false,1692 wasRevealed: false,1693 circle: false,1694 },1695 {1696 solution: { content: '', isBlack: true, number: '' },1697 isBlack: false,1698 content: '',1699 number: '',1700 wasChecked: false,1701 wasRevealed: false,1702 circle: false,1703 },1704 {1705 solution: { content: 'C', isBlack: false, number: '55' },1706 isBlack: false,1707 content: '',1708 number: '',1709 wasChecked: false,1710 wasRevealed: false,1711 circle: false,1712 },1713 {1714 solution: { content: 'A', isBlack: false, number: '' },1715 isBlack: false,1716 content: '',1717 number: '',1718 wasChecked: false,1719 wasRevealed: false,1720 circle: false,1721 },1722 {1723 solution: { content: 'N', isBlack: false, number: '' },1724 isBlack: false,1725 content: '',1726 number: '',1727 wasChecked: false,1728 wasRevealed: false,1729 circle: false,1730 },1731 {1732 solution: { content: 'W', isBlack: false, number: '' },1733 isBlack: false,1734 content: '',1735 number: '',1736 wasChecked: false,1737 wasRevealed: false,1738 circle: false,1739 },1740 {1741 solution: { content: 'E', isBlack: false, number: '' },1742 isBlack: false,1743 content: '',1744 number: '',1745 wasChecked: false,1746 wasRevealed: false,1747 circle: false,1748 },1749 {1750 solution: { content: 'T', isBlack: false, number: '' },1751 isBlack: false,1752 content: '',1753 number: '',1754 wasChecked: false,1755 wasRevealed: false,1756 circle: false,1757 },1758 {1759 solution: { content: 'A', isBlack: false, number: '' },1760 isBlack: false,1761 content: '',1762 number: '',1763 wasChecked: false,1764 wasRevealed: false,1765 circle: false,1766 },1767 {1768 solution: { content: 'L', isBlack: false, number: '' },1769 isBlack: false,1770 content: '',1771 number: '',1772 wasChecked: false,1773 wasRevealed: false,1774 circle: false,1775 },1776 {1777 solution: { content: 'K', isBlack: false, number: '' },1778 isBlack: false,1779 content: '',1780 number: '',1781 wasChecked: false,1782 wasRevealed: false,1783 circle: false,1784 },1785 ],1786 [1787 {1788 solution: { content: 'L', isBlack: false, number: '56' },1789 isBlack: false,1790 content: '',1791 number: '',1792 wasChecked: false,1793 wasRevealed: false,1794 circle: false,1795 },1796 {1797 solution: { content: 'O', isBlack: false, number: '' },1798 isBlack: false,1799 content: '',1800 number: '',1801 wasChecked: false,1802 wasRevealed: false,1803 circle: false,1804 },1805 {1806 solution: { content: 'T', isBlack: false, number: '' },1807 isBlack: false,1808 content: '',1809 number: '',1810 wasChecked: false,1811 wasRevealed: false,1812 circle: false,1813 },1814 {1815 solution: { content: 'T', isBlack: false, number: '' },1816 isBlack: false,1817 content: '',1818 number: '',1819 wasChecked: false,1820 wasRevealed: false,1821 circle: false,1822 },1823 {1824 solution: { content: 'A', isBlack: false, number: '' },1825 isBlack: false,1826 content: '',1827 number: '',1828 wasChecked: false,1829 wasRevealed: false,1830 circle: false,1831 },1832 {1833 solution: { content: '', isBlack: true, number: '' },1834 isBlack: false,1835 content: '',1836 number: '',1837 wasChecked: false,1838 wasRevealed: false,1839 circle: false,1840 },1841 {1842 solution: { content: 'H', isBlack: false, number: '57' },1843 isBlack: false,1844 content: '',1845 number: '',1846 wasChecked: false,1847 wasRevealed: false,1848 circle: false,1849 },1850 {1851 solution: { content: 'I', isBlack: false, number: '' },1852 isBlack: false,1853 content: '',1854 number: '',1855 wasChecked: false,1856 wasRevealed: false,1857 circle: false,1858 },1859 {1860 solution: { content: 'T', isBlack: false, number: '' },1861 isBlack: false,1862 content: '',1863 number: '',1864 wasChecked: false,1865 wasRevealed: false,1866 circle: false,1867 },1868 {1869 solution: { content: 'A', isBlack: false, number: '' },1870 isBlack: false,1871 content: '',1872 number: '',1873 wasChecked: false,1874 wasRevealed: false,1875 circle: false,1876 },1877 {1878 solution: { content: 'N', isBlack: false, number: '' },1879 isBlack: false,1880 content: '',1881 number: '',1882 wasChecked: false,1883 wasRevealed: false,1884 circle: false,1885 },1886 {1887 solution: { content: 'E', isBlack: false, number: '' },1888 isBlack: false,1889 content: '',1890 number: '',1891 wasChecked: false,1892 wasRevealed: false,1893 circle: false,1894 },1895 {1896 solution: { content: 'R', isBlack: false, number: '' },1897 isBlack: false,1898 content: '',1899 number: '',1900 wasChecked: false,1901 wasRevealed: false,1902 circle: false,1903 },1904 {1905 solution: { content: 'V', isBlack: false, number: '' },1906 isBlack: false,1907 content: '',1908 number: '',1909 wasChecked: false,1910 wasRevealed: false,1911 circle: false,1912 },1913 {1914 solution: { content: 'E', isBlack: false, number: '' },1915 isBlack: false,1916 content: '',1917 number: '',1918 wasChecked: false,1919 wasRevealed: false,1920 circle: false,1921 },1922 ],1923 [1924 {1925 solution: { content: 'A', isBlack: false, number: '58' },1926 isBlack: false,1927 content: '',1928 number: '',1929 wasChecked: false,1930 wasRevealed: false,1931 circle: false,1932 },1933 {1934 solution: { content: 'N', isBlack: false, number: '' },1935 isBlack: false,1936 content: '',1937 number: '',1938 wasChecked: false,1939 wasRevealed: false,1940 circle: false,1941 },1942 {1943 solution: { content: 'S', isBlack: false, number: '' },1944 isBlack: false,1945 content: '',1946 number: '',1947 wasChecked: false,1948 wasRevealed: false,1949 circle: false,1950 },1951 {1952 solution: { content: 'E', isBlack: false, number: '' },1953 isBlack: false,1954 content: '',1955 number: '',1956 wasChecked: false,1957 wasRevealed: false,1958 circle: false,1959 },1960 {1961 solution: { content: 'L', isBlack: false, number: '' },1962 isBlack: false,1963 content: '',1964 number: '',1965 wasChecked: false,1966 wasRevealed: false,1967 circle: false,1968 },1969 {1970 solution: { content: '', isBlack: true, number: '' },1971 isBlack: false,1972 content: '',1973 number: '',1974 wasChecked: false,1975 wasRevealed: false,1976 circle: false,1977 },1978 {1979 solution: { content: 'I', isBlack: false, number: '59' },1980 isBlack: false,1981 content: '',1982 number: '',1983 wasChecked: false,1984 wasRevealed: false,1985 circle: false,1986 },1987 {1988 solution: { content: 'N', isBlack: false, number: '' },1989 isBlack: false,1990 content: '',1991 number: '',1992 wasChecked: false,1993 wasRevealed: false,1994 circle: false,1995 },1996 {1997 solution: { content: 'S', isBlack: false, number: '' },1998 isBlack: false,1999 content: '',2000 number: '',2001 wasChecked: false,2002 wasRevealed: false,2003 circle: false,2004 },2005 {2006 solution: { content: '', isBlack: true, number: '' },2007 isBlack: false,2008 content: '',2009 number: '',2010 wasChecked: false,2011 wasRevealed: false,2012 circle: false,2013 },2014 {2015 solution: { content: 'E', isBlack: false, number: '60' },2016 isBlack: false,2017 content: '',2018 number: '',2019 wasChecked: false,2020 wasRevealed: false,2021 circle: false,2022 },2023 {2024 solution: { content: 'S', isBlack: false, number: '' },2025 isBlack: false,2026 content: '',2027 number: '',2028 wasChecked: false,2029 wasRevealed: false,2030 circle: false,2031 },2032 {2033 solution: { content: 'T', isBlack: false, number: '' },2034 isBlack: false,2035 content: '',2036 number: '',2037 wasChecked: false,2038 wasRevealed: false,2039 circle: false,2040 },2041 {2042 solution: { content: 'E', isBlack: false, number: '' },2043 isBlack: false,2044 content: '',2045 number: '',2046 wasChecked: false,2047 wasRevealed: false,2048 circle: false,2049 },2050 {2051 solution: { content: 'R', isBlack: false, number: '' },2052 isBlack: false,2053 content: '',2054 number: '',2055 wasChecked: false,2056 wasRevealed: false,2057 circle: false,2058 },2059 ],2060 ],2061 cursor: { row: 0, col: 0, direction: 'across' },2062 time: 0,2063 clues: [2064 { number: '1', direction: 'across', text: 'Presses (down)' },2065 { number: '1', direction: 'down', text: 'Key symbol near "!"' },2066 { number: '2', direction: 'down', text: 'Tough nut to crack' },2067 { number: '3', direction: 'down', text: 'Sang part of "Old MacDonald"' },2068 { number: '4', direction: 'down', text: "Beadlike bit on a surfer's necklace" },2069 { number: '5', direction: 'down', text: 'Improbable' },2070 { number: '6', direction: 'across', text: 'Org. for the Houston Dynamo and Austin F.C.' },2071 { number: '6', direction: 'down', text: 'Ginormous' },2072 {2073 number: '7',2074 direction: 'down',2075 text: '___ Bassi, first woman to earn a doctorate in science (University of Bologna, 1732)',2076 },2077 { number: '8', direction: 'down', text: 'Garage brand' },2078 { number: '9', direction: 'across', text: 'Along for the ride, say' },2079 { number: '9', direction: 'down', text: 'Like some threats' },2080 { number: '10', direction: 'down', text: '"Slow Hands" singer ___ Horan' },2081 { number: '11', direction: 'down', text: 'Four on the floor?' },2082 { number: '12', direction: 'down', text: 'Like tutoring, typically' },2083 { number: '13', direction: 'down', text: 'Peaceful protest' },2084 { number: '14', direction: 'across', text: '"Yeah, lunch now works for me"' },2085 { number: '15', direction: 'down', text: 'Party org.' },2086 { number: '16', direction: 'across', text: 'Taurasi who leads the W.N.B.A. in career scoring' },2087 { number: '17', direction: 'across', text: 'Showing promise' },2088 { number: '18', direction: 'across', text: 'Tag' },2089 { number: '19', direction: 'across', text: "What you'd love to own and drive" },2090 { number: '20', direction: 'across', text: 'Acknowledgment with a shrug' },2091 { number: '20', direction: 'down', text: 'Pests for a grain farmer' },2092 { number: '21', direction: 'across', text: '"This ___ here!"' },2093 { number: '22', direction: 'across', text: 'Partner of day' },2094 { number: '23', direction: 'down', text: 'Be sycophantic' },2095 { number: '24', direction: 'across', text: '2014 Television Hall of Fame inductee' },2096 { number: '25', direction: 'across', text: 'Spirals out over the winter holidays?' },2097 { number: '26', direction: 'down', text: 'Had quite a trip?' },2098 { number: '27', direction: 'down', text: 'Styles associated with the Beatles' },2099 { number: '28', direction: 'down', text: 'Taken care of, with "out"' },2100 { number: '29', direction: 'across', text: 'Endorsement, for short' },2101 { number: '30', direction: 'down', text: '___ Cruz, so-called "Queen of Salsa"' },2102 { number: '31', direction: 'across', text: 'Gymnast Mary ___ Retton' },2103 {2104 number: '32',2105 direction: 'across',2106 text: "Its members were collectively awarded Time magazine's 2017 Person of the Year",2107 },2108 { number: '32', direction: 'down', text: 'Hat tricks are seen in them' },2109 { number: '33', direction: 'down', text: '"Thanks a ___!"' },2110 { number: '34', direction: 'down', text: 'Parts of many rom-coms' },2111 { number: '35', direction: 'across', text: 'Unearned advantage based on sex' },2112 { number: '35', direction: 'down', text: 'Quick post-wedding getaway' },2113 { number: '36', direction: 'across', text: 'Hit HBO series based on a Liane Moriarty novel' },2114 { number: '36', direction: 'down', text: "World's largest pasta producer" },2115 { number: '37', direction: 'across', text: 'What "minuscule" is often misspelled with' },2116 { number: '38', direction: 'across', text: 'Stub hub?' },2117 { number: '39', direction: 'across', text: 'Prep class subject, for short' },2118 { number: '40', direction: 'across', text: 'Costa ___' },2119 { number: '41', direction: 'down', text: 'Fire ___ (gemstone)' },2120 { number: '42', direction: 'across', text: 'Activity common in nightclubs, in brief' },2121 { number: '43', direction: 'down', text: '"Wasn\'t the first time enough?!"' },2122 { number: '44', direction: 'across', text: 'Italian for "so"' },2123 { number: '45', direction: 'down', text: 'Genre for Bridget Riley\'s "Shadow Play"' },2124 { number: '46', direction: 'down', text: 'Crack' },2125 { number: '47', direction: 'down', text: 'Aide for a cartoonist' },2126 { number: '48', direction: 'across', text: 'Tab on a Google search' },2127 { number: '49', direction: 'down', text: "It doesn't offer flights on Saturday mornings" },2128 { number: '50', direction: 'across', text: 'Band together against' },2129 { number: '51', direction: 'down', text: "Workers you wouldn't want to see in the office?" },2130 { number: '52', direction: 'down', text: 'Group co-founded by Eazy-E' },2131 { number: '53', direction: 'down', text: 'Splicing target' },2132 { number: '54', direction: 'across', text: 'Lite' },2133 { number: '55', direction: 'across', text: "Question that's rarely a sign of good news" },2134 { number: '55', direction: 'down', text: 'X' },2135 { number: '56', direction: 'across', text: 'Buncha' },2136 { number: '57', direction: 'across', text: 'Get overly personal, perhaps' },2137 { number: '58', direction: 'across', text: 'Environmentalist Adams' },2138 { number: '59', direction: 'across', text: "They're good to know" },2139 { number: '60', direction: 'across', text: 'Compound with a fruity smell' },2140 ],2141 symmetry: null,2142 isAutonumbered: false,2143 title: 'NY Times, Friday, June 25, 2021 ',2144 author: 'Scott Earl / Will Shortz',2145 copyright: '© 2021, The New York Times',2146 note: '',...

Full Screen

Full Screen

ChessModel.js

Source:ChessModel.js Github

copy

Full Screen

1import { PIECES } from '../Constants';2const cols = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];3const rows = ['8', '7', '6', '5', '4', '3', '2', '1'];4const pieceObject = (piece, isBlack) => {5 return {piece, isBlack};6}7const getKey = (row, col) => col + "" + row;8const getValue = (row, col) => {9 switch (row) {10 case '7': return pieceObject(PIECES.pawn, true);11 case '2': return pieceObject(PIECES.pawn, false);12 case '8':13 switch (col) {14 case 'a': return pieceObject(PIECES.rook, true);15 case 'b': return pieceObject(PIECES.horse, true);16 case 'c': return pieceObject(PIECES.bishop, true);17 case 'h': return pieceObject(PIECES.rook, true);18 case 'g': return pieceObject(PIECES.horse, true);19 case 'f': return pieceObject(PIECES.bishop, true);20 }21 case '1':22 switch (col) {23 case 'a': return pieceObject(PIECES.rook, false);24 case 'b': return pieceObject(PIECES.horse, false);25 case 'c': return pieceObject(PIECES.bishop, false);26 case 'h': return pieceObject(PIECES.rook, false);27 case 'g': return pieceObject(PIECES.horse, false);28 case 'f': return pieceObject(PIECES.bishop, false);29 }30 }31 switch(getKey(row, col)) {32 case 'd8': return pieceObject(PIECES.queen, true);33 case 'd1': return pieceObject(PIECES.queen, false);34 case 'e8': return pieceObject(PIECES.king, true);35 case 'e1': return pieceObject(PIECES.king, false);36 }37 return pieceObject(PIECES.none, false);38}39export default class ChessModel {40 constructor(obj = {}) {41 this.map = obj;42 this.lastMove = {};43 this.removePieceAt = {}44 if (obj.a1) return;45 rows.forEach(row => {46 cols.forEach(col => {47 let key = getKey(row, col);48 let value = getValue(row, col);49 this.map[key] = value;50 })51 })52 }53 isEmpty() {54 return this.map && this.map !== {};55 }56 containsIndex(i, j) {57 return (i >= 0 && i < rows.length && j >= 0 && j < cols.length);58 }59 getIndexAt(key) {60 if (!this.map[key]) return;61 if (key.length < 2) return;62 let col = key.charAt(0);63 let row = key.charAt(1);64 let i = rows.indexOf(row);65 let j = cols.indexOf(col);66 return {i,j};67 }68 getKeyAt(i, j) {69 if (!this.containsIndex(i, j)) return;70 let row = rows[i];71 let col = cols[j];72 return getKey(row, col);73 }74 getPieceAt(i, j) {75 if (!this.containsIndex(i, j)) return;76 let key = this.getKeyAt(i, j);77 return this.map[key];78 }79 setPieceAt(i, j, piece) {80 if (!this.containsIndex(i, j)) return;81 let key = this.getKeyAt(i, j);82 this.map[key] = piece;83 }84 isEmptyAt(i,j) {85 if (!this.containsIndex(i,j)) return false;86 let { piece } = this.getPieceAt(i, j);87 return piece == PIECES.none;88 }89 movePiece(fromI, fromJ, toI, toJ, piece) {90 this.setPieceAt(fromI, fromJ, {piece: PIECES.none, isBlack: false})91 this.setPieceAt(toI, toJ, piece)92 this.lastMove = {fromI, fromJ, toI, toJ, piece: piece.piece};93 if (this.removePieceAt.i && this.removePieceAt.j) {94 this.setPieceAt(this.removePieceAt.i, this.removePieceAt.j, {piece: PIECES.none, isBlack: false});95 this.removePieceAt = {};96 }97 return this.lastMove;98 }99 copy() {100 let mapCopy = Object.assign({}, this.map);101 return JSON.parse(JSON.stringify(mapCopy));102 }103 canAttack(i, j, isBlack) {104 var next = this.getPieceAt(i, j);105 return (next && next.isBlack != isBlack)106 }107 getPawnMoves(i,j,isBlack) {108 let moves = [];109 let newI = isBlack ? i + 1 : i - 1;110 let newI2 = isBlack ? i + 2 : i - 2;111 this.isEmptyAt(newI, j) && moves.push({i: newI, j});112 this.isEmptyAt(newI, j) && this.isEmptyAt(newI2, j) && (i == 6 || i == 1) && moves.push({i: newI2, j});113 !this.isEmptyAt(newI, j-1) && this.canAttack(newI, j-1, isBlack) && moves.push({i: newI, j: j-1});114 !this.isEmptyAt(newI, j+1) && this.canAttack(newI, j+1, isBlack) && moves.push({i: newI, j: j+1});115 if (116 this.lastMove117 && this.lastMove.piece == PIECES.pawn118 && Math.abs(this.lastMove.fromI - i) == 2119 && this.lastMove.toI == i120 && (this.lastMove.fromI == 6 || this.lastMove.fromI == 1)) {121 let isLeft = this.lastMove.toJ == j - 1122 let newJ = isLeft ? j - 1 : j + 1;123 let removePieceAt = {i:this.lastMove.toI, j:this.lastMove.toJ};124 moves.push({i: newI, j: newJ, removePieceAt}); //de passant125 }126 return moves;127 }128 getRookMoves(i,j,isBlack) {129 let moves = [];130 var row;131 var col;132 // up133 for (row = i + 1; row < rows.length && this.isEmptyAt(row, j); row++) moves.push({i: row, j})134 if (this.canAttack(row, j, isBlack)) moves.push({i: row, j})135 // down136 for (row = i - 1; row >= 0 && this.isEmptyAt(row, j); row--) moves.push({i: row, j})137 if (this.canAttack(row, j, isBlack)) moves.push({i: row, j})138 // left139 for (col = j - 1; col >= 0 && this.isEmptyAt(i, col); col--) moves.push({i, j: col})140 if (this.canAttack(i, col, isBlack)) moves.push({i, j: col})141 // right142 for (col = j + 1; col < cols.length && this.isEmptyAt(i, col); col++) moves.push({i, j: col})143 if (this.canAttack(i, col, isBlack)) moves.push({i, j: col})144 return moves;145 }146 getHorseMoves(i,j,isBlack) {147 let moves = [];148 let spaces = [149 {row: i + 2, col: j - 1},150 {row: i + 2, col: j + 1},151 {row: i - 2, col: j - 1},152 {row: i - 2, col: j + 1},153 {row: i + 1, col: j - 2},154 {row: i + 1, col: j + 2},155 {row: i - 1, col: j - 2},156 {row: i - 1, col: j + 2}157 ];158 spaces.forEach(({row,col}) => {159 if (this.isEmptyAt(row, col) || this.canAttack(row, col, isBlack)) moves.push({i: row, j: col})160 })161 return moves;162 }163 getBishopMoves(i,j,isBlack) {164 let moves = [];165 var row;166 var col;167 row = i + 1;168 col = j + 1;169 while (this.isEmptyAt(row, col)) {170 moves.push({i: row, j: col});171 row++;172 col++;173 }174 if (this.canAttack(row, col, isBlack)) moves.push({i: row, j: col});175 row = i - 1;176 col = j + 1;177 while (this.isEmptyAt(row, col)) {178 moves.push({i: row, j: col});179 row--;180 col++;181 }182 if (this.canAttack(row, col, isBlack)) moves.push({i: row, j: col});183 row = i + 1;184 col = j - 1;185 while (this.isEmptyAt(row, col)) {186 moves.push({i: row, j: col});187 row++;188 col--;189 }190 if (this.canAttack(row, col, isBlack)) moves.push({i: row, j: col});191 row = i - 1;192 col = j - 1;193 while (this.isEmptyAt(row, col)) {194 moves.push({i: row, j: col});195 row--;196 col--;197 }198 if (this.canAttack(row, col, isBlack)) moves.push({i: row, j: col});199 return moves;200 }201 getQueenMoves(i,j,isBlack) {202 return this.getRookMoves(i,j,isBlack).concat(this.getBishopMoves(i,j,isBlack));203 }204 getKingMoves(i,j,isBlack) {205 let moves = [];206 let spaces = [207 {row: i + 1, col: j + 1},208 {row: i + 1, col: j - 1},209 {row: i - 1, col: j + 1},210 {row: i - 1, col: j - 1},211 {row: i + 1, col: j},212 {row: i - 1, col: j},213 {row: i, col: j + 1},214 {row: i, col: j - 1}215 ];216 spaces.forEach(({row,col}) => {217 if (this.isEmptyAt(row, col) || this.canAttack(row, col, isBlack)) moves.push({i: row, j: col})218 })219 return moves;220 }221 getPieceMoves(i, j) {222 let { piece, isBlack } = this.getPieceAt(i, j);223 switch (piece)224 {225 case PIECES.none: return [];226 case PIECES.pawn: return this.getPawnMoves(i,j,isBlack);227 case PIECES.rook: return this.getRookMoves(i,j,isBlack);228 case PIECES.horse: return this.getHorseMoves(i,j,isBlack);229 case PIECES.bishop: return this.getBishopMoves(i,j,isBlack);230 case PIECES.queen: return this.getQueenMoves(i,j,isBlack);231 case PIECES.king: return this.getKingMoves(i,j,isBlack);232 }233 }234 getAllPieceMoves(isBlack, callback) {235 var result = [];236 Object.keys(this.map).forEach(key => {237 let value = this.map[key];238 if (value.isBlack == isBlack) {239 let {i, j} = this.getIndexAt(key);240 let moves = this.getPieceMoves(i, j);241 if (moves && callback) callback(moves);242 moves.forEach(move => result.push(move));243 }244 })245 return result;246 }247 isInCheck(i, j) {248 let king = this.getPieceAt(i, j);249 let isInCheck = false;250 this.getAllPieceMoves(!king.isBlack, (moves) => {251 moves.forEach(move => {252 if (move.i == i && move.j == j) {253 isInCheck = true;254 return true;255 }256 })257 })258 return isInCheck;259 }260 isMoveIntoCheck(fromI, fromJ, toI, toJ, piece, isBlack, kingKey) {261 let mapCopy = this.copy();262 this.movePiece(fromI, fromJ, toI, toJ, {piece, isBlack});263 var {i, j} = this.getIndexAt(kingKey)264 if (piece == PIECES.king) {265 i = toI;266 j = toJ;267 }268 let result = this.isInCheck(i, j);269 this.map = mapCopy;270 return result;271 }272 findKing(isBlack) {273 let result;274 Object.keys(this.map).forEach(key => {275 let value = this.map[key];276 if (value.piece == PIECES.king && value.isBlack == isBlack) {277 result = key;278 }279 })280 return result;281 }282 isGameOver() {283 let blackKing = this.findKing(true);284 let whiteKing = this.findKing(false);285 let blackPos = this.getIndexAt(blackKing);286 let whitePos = this.getIndexAt(whiteKing);287 let isBlackInCheck = this.isInCheck(blackPos.i, blackPos.j);288 let isWhiteInCheck = this.isInCheck(whitePos.i, whitePos.j);289 let canBlackMove = this.getAllValidMoves(true).length;290 let canWhiteMove = this.getAllValidMoves(false).length;291 if (!canBlackMove && isBlackInCheck) return "White Wins";292 if (!canWhiteMove && isWhiteInCheck) return "Black Wins"293 if (!canBlackMove || !canWhiteMove) return "It's a Draw";294 }295 getAllValidMoves(isBlack) {296 let result = [];297 Object.keys(this.map).forEach(key => {298 let value = this.map[key];299 if (value.isBlack == isBlack) {300 let {i, j} = this.getIndexAt(key);301 let moves = this.getValidMoves(i, j);302 moves.forEach(move => result.push(move))303 }304 })305 return result;306 }307 getValidMoves(i, j) {308 let { piece, isBlack } = this.getPieceAt(i, j);309 let moves = []310 let kingKey = this.findKing(isBlack)311 this.getPieceMoves(i, j).forEach(move => {312 if (!this.isMoveIntoCheck(i, j, move.i, move.j, piece, isBlack, kingKey)) moves.push(move);313 });314 return moves;315 }316 isMoveValid(fromI, fromJ, toI, toJ) {317 let isValid = false;318 this.getValidMoves(fromI, fromJ).forEach(move => {319 if (move.i == toI && move.j == toJ) {320 isValid = true;321 if (move.removePieceAt) {322 this.removePieceAt = move.removePieceAt323 }324 }325 })326 return isValid;327 }...

Full Screen

Full Screen

BoardArrayCell.js

Source:BoardArrayCell.js Github

copy

Full Screen

1function isDarkCell(i, j) {2 if (i % 2 == 0) {3 if (j % 2 == 0) {4 return false5 }6 else7 return true8 }9 else {10 if (j % 2 == 0) {11 return true12 }13 else14 return false15 }16}17export default class BoardArrayCell {18 constructor(xInput, yInput) {19 this.xValue = xInput20 this.yValue = yInput21 this.position=[xInput, yInput]22 this.piece = "nothing"23 this.isBlack = false24 this.isWhite = false25 this.setPieceNameAndColor(xInput, yInput)26 this.isAlive = true27 this.hasMoved = false28 }29 getPosition(){30 return this.position31 }32 setPieceNameAndColor(x, y){33 xValue = x34 yValue = y35 36 if(xValue == 0 && yValue == 0){37 this.piece = "a8rook"38 this.isBlack = true39 }40 else if(xValue == 1 && yValue == 0){41 this.piece = "b8knight"42 this.isBlack = true43 44 }45 else if(xValue == 2 && yValue == 0){46 this.piece = "c8bishop"47 this.isBlack = true48 49 }50 else if(xValue == 3 && yValue == 0){51 this.piece = "d8queen"52 this.isBlack = true53 54 }55 else if(xValue == 4 && yValue == 0){56 this.piece = "e8king"57 this.isBlack = true58 59 }60 else if(xValue == 5 && yValue == 0){61 this.piece = "f8bishop"62 this.isBlack = true63 64 }65 else if(xValue == 6 && yValue == 0){66 this.piece = "g8knight"67 this.isBlack = true68 69 }70 else if(xValue == 7 && yValue == 0){71 this.piece = "h8rook"72 this.isBlack = true73 74 }75 else if(xValue == 0 && yValue == 1){76 this.piece = "a7pawn"77 this.isBlack = true78 79 }80 else if(xValue == 1 && yValue == 1){81 this.piece = "b7pawn"82 this.isBlack = true83 84 }85 else if(xValue == 2 && yValue == 1){86 this.piece = "c7pawn"87 this.isBlack = true88 89 }90 else if(xValue == 3 && yValue == 1){91 this.piece = "d7pawn"92 this.isBlack = true93 94 }95 else if(xValue == 4 && yValue == 1){96 this.piece = "e7pawn"97 this.isBlack = true98 99 }100 else if(xValue == 5 && yValue == 1){101 this.piece = "f7pawn"102 this.isBlack = true103 104 }105 else if(xValue == 6 && yValue == 1){106 this.piece = "g7pawn"107 this.isBlack = true108 109 }110 else if(xValue == 7 && yValue == 1){111 this.piece = "h7pawn"112 this.isBlack = true113 114 }115 116 else if(xValue == 0 && yValue == 7){117 this.piece = "a1rook"118 this.isWhite = true119 120 }121 else if(xValue == 1 && yValue == 7){122 this.piece = "b1knight"123 this.isWhite = true124 }125 else if(xValue == 2 && yValue == 7){126 this.piece = "c1bishop"127 this.isWhite = true128 }129 else if(xValue == 3 && yValue == 7){130 this.piece = "d1queen"131 this.isWhite = true132 }133 else if(xValue == 4 && yValue == 7){134 this.piece = "e1king"135 this.isWhite = true136 }137 else if(xValue == 5 && yValue == 7){138 this.piece = "f1bishop"139 this.isWhite = true140 }141 else if(xValue == 6 && yValue == 7){142 this.piece = "g1knight"143 this.isWhite = true144 }145 else if(xValue == 7 && yValue == 7){146 this.piece = "h1rook"147 this.isWhite = true148 }149 else if(xValue == 0 && yValue == 6){150 this.piece = "a2pawn"151 this.isWhite = true152 }153 else if(xValue == 1 && yValue == 6){154 this.piece = "b2pawn"155 this.isWhite = true156 }157 else if(xValue == 2 && yValue == 6){158 this.piece = "c2pawn"159 this.isWhite = true160 }161 else if(xValue == 3 && yValue == 6){162 this.piece = "d2pawn"163 this.isWhite = true164 }165 else if(xValue == 4 && yValue == 6){166 this.piece = "e2pawn"167 this.isWhite = true168 }169 else if(xValue == 5 && yValue == 6){170 this.piece = "f2pawn"171 this.isWhite = true172 }173 else if(xValue == 6 && yValue == 6){174 this.piece = "g2pawn"175 this.isWhite = true176 }177 else if(xValue == 7 && yValue == 6){178 this.piece = "h2pawn"179 this.isWhite = true180 }181 else{182 this.piece="nothing"183 this.isAlive = false184 }185 186 };...

Full Screen

Full Screen

server.js

Source:server.js Github

copy

Full Screen

1var app = require('express')();2var http = require('http').Server(app);3var io = require('socket.io')(http);4var player = {};5var black = [], white = [];6var isBlack = true, isOver = false;7app.get('/', function(req, res){8 res.sendFile(__dirname+'/index.html');9})10io.on('connection', function(socket){11 console.log('connect succees !')12 socket.on('submit', function(msg){13 io.emit('submit',msg)14 });15 socket.on('move', function (xy) {16 if (isOver) return false;17 if(xy.p != (isBlack ? player.black : player.white)) {18 return false19 }20 var num = getXY(xy.x, xy.y);21 if (black.indexOf(num) > -1 || white.indexOf(num) > -1) {22 return false23 }24 if (isBlack) {25 black.push(num)26 } else {27 white.push(num)28 }29 xy.isBlack = isBlack;30 io.emit('move', xy);31 checkLine(xy.x, xy.y);32 isBlack = !isBlack;33 });34 socket.on('join', function (name) {35 var fang = '旁观者';36 if (name != '') {37 if (!player.black || player.black==name) {38 player.black = name;39 fang = '黑方'40 } else if (!player.white || player.white==name) {41 player.white= name;42 fang = '白方'43 }44 }45 io.emit('join', {46 name: name,47 fang: fang,48 black: black,49 white: white,50 isBlack: isBlack51 })52 });53 socket.on('logout', function (name) {54 if (player.black == name){55 player.black = null56 reset();57 } else if (player.white == name) {58 player.white = null59 reset();60 }61 });62});63// 检查是否获胜64// 像这种四条轴线的,不循环也没问题,把中间的算法抽出来写成一个函数,调用四次就好了65function checkLine(x, y) {66 var i = 1, s = 0;67 var arr = isBlack ? black : white;68 var xo = [[1,0], [1,1], [0,1], [1,-1]];69 for (var o = 0; o < 4; o++) {70 for (var r = 1,s = 0; r >= -1; r -= 2, i = 1) {71 while (arr.indexOf(getXY(x + xo[o][0]*r*i*50, y + xo[o][1]*r*i*50)) > -1) {72 i++;73 s++;74 if (s >= 4) {75 isOver = true;76 io.emit('win', ~~!isBlack);77 reset();78 return false;79 }80 }81 }82 }83}84function getXY(x, y) {85 if (x < 0 || y < 0) {86 return -1;87 }88 return (y-y%50)*50 + x-x%50;89}90function reset() {91 player = {};92 black = [], white = [];93 isBlack = true, isOver = false;94}95http.listen(3000, function(){96 console.log('listening on port 3000')...

Full Screen

Full Screen

Navbar.js

Source:Navbar.js Github

copy

Full Screen

1import React from "react"2import styled, { css } from "styled-components"3import { Link } from "gatsby"4import { TelegramIcon, TwitterIcon, EmailIcon } from "components/Svg"5import { colors } from "theme"6const NavbarMenuContainer = styled.div`7 display: flex;8 flex-direction: column;9 align-items: flex-end;10 box-orient: vertical;11 top: 0;12 right: 30px;13 position: fixed;14 width: 50px;15 height: 404px;16 z-index: 1;17 @media screen and (max-width: 999px) {18 display: none;19 }20`21const LinkCSS = css`22 writing-mode: vertical-lr;23 margin-top: 25px;24 font-size: 19px;25 color: ${(props) => (props.isBlack ? colors.black : colors.white)};26 text-decoration: none;27 padding-right: 10px;28 font-weight: 800;29 transition: color 0.3s ease-out;30 &:hover {31 color: ${(props) => (props.isBlack ? colors.reddishPink : colors.black)};32 }33`34const StyledLink = styled(Link)`35 ${LinkCSS}36`37const SExternalLink = styled.a`38 ${LinkCSS}39`40const SImgLink = styled.a`41 margin-top: 25px;42 margin-right: -2px;43`44const Navbar = ({ isBlack, setLinkRef, data }) => (45 <NavbarMenuContainer>46 {/* <StyledLink47 id="dappsLink"48 isBlack={isBlack}49 to="/dapps"50 innerRef={setLinkRef}51 >52 Dapps53 </StyledLink>54 <StyledLink55 id="speakersLink"56 isBlack={isBlack}57 to="/#edition2019"58 innerRef={setLinkRef}59 >60 Speakers61 </StyledLink>62 <SExternalLink63 id="sponsorsLink"64 isBlack={isBlack}65 href="/DappCon2020SponsorshipPackages.pdf"66 target="_blank"67 ref={setLinkRef}68 >69 Sponsors70 </SExternalLink>71 <StyledLink72 id="ticketsLink"73 isBlack={isBlack}74 to="/tickets"75 innerRef={setLinkRef}76 >77 Tickets78 </StyledLink> */}79 <SImgLink80 isBlack={isBlack}81 href="https://twitter.com/dappcon_berlin"82 target="_blank"83 ref={setLinkRef}84 id="twitterLink"85 >86 <TwitterIcon fill={isBlack ? colors.black : colors.white} />87 </SImgLink>88 <SImgLink89 isBlack={isBlack}90 href="https://t.me/joinchat/EcVRsUPKJRYHbrijhd_Cbw"91 target="_blank"92 ref={setLinkRef}93 id="tgLink"94 >95 <TelegramIcon fill={isBlack ? colors.black : colors.white} />96 </SImgLink>97 <SImgLink98 isBlack={isBlack}99 href="mailto:info@dappcon.io"100 target="_blank"101 ref={setLinkRef}102 id="emailLink"103 >104 <EmailIcon fill={isBlack ? colors.black : colors.white} />105 </SImgLink>106 </NavbarMenuContainer>107)...

Full Screen

Full Screen

square.js

Source:square.js Github

copy

Full Screen

1import { Box, Typography } from "@mui/material";2import { useMemo } from "react";3import PawnBlack from "../../public/assets/imgs/pawn_black.png";4import PawnWhite from "../../public/assets/imgs/pawn_white.png";5import CastleBlack from "../../public/assets/imgs/castle_black.png";6import CastleWhite from "../../public/assets/imgs/castle_white.png";7import KnightWhite from "../../public/assets/imgs/knight_white.png";8import KnightBlack from "../../public/assets/imgs/knight_black.png";9import BishopWhite from "../../public/assets/imgs/bishop_white.png";10import BishopBlack from "../../public/assets/imgs/bishop_black.png";11import KingWhite from "../../public/assets/imgs/king_white.png";12import KingBlack from "../../public/assets/imgs/king_black.png";13import QueenWhite from "../../public/assets/imgs/queen_white.png";14import QueenBlack from "../../public/assets/imgs/queen_black.png";15const figGenerator = (fig) => {16 const isBlack = (fig & 1) === 1;17 if ((fig & 0b10) === 0b10) {18 return isBlack ? PawnBlack : PawnWhite;19 } else if ((fig & 0b100) === 0b100) {20 return isBlack ? CastleBlack : CastleWhite;21 } else if ((fig & 0b1000) === 0b1000) {22 return isBlack ? KnightBlack : KnightWhite;23 } else if ((fig & 0b10000) === 0b10000) {24 return isBlack ? BishopBlack : BishopWhite;25 } else if ((fig & 0b100000) === 0b100000) {26 return isBlack ? QueenBlack : QueenWhite;27 } else if ((fig & 0b1000000) === 0b1000000) {28 return isBlack ? KingBlack : KingWhite;29 }30}31function Square({ width = 80, height = 80, fig = 0, i, j }) {32 const isBlack = useMemo(() => Boolean((i + (j % 2)) % 2), [i, j]);33 return <Box sx={{34 position: "relative",35 width: `${width}px`,36 height: `${height}px`,37 backgroundColor: isBlack ? "#CEB766" : "#EEEED2",38 textAlign: "center"39 }}>40 {41 i === 0 && <Typography sx={{42 position: "absolute",43 left: "4px",44 top: "2px",45 color: !isBlack ? "#CEB766" : "#EEEED2",46 }}>{8 - j}</Typography>47 }48 {49 j === 7 && <Typography sx={{50 position: "absolute",51 right: "4px",52 bottom: "2px",53 color: !isBlack ? "#CEB766" : "#EEEED2",54 }}>{String.fromCharCode(97 + i)}</Typography>55 }56 {fig > 0 && <img src={figGenerator(fig)} style={{marginTop: "15px"}}/>}57 </Box>58}...

Full Screen

Full Screen

theme.utils.js

Source:theme.utils.js Github

copy

Full Screen

1import { blackTheme, whiteTheme } from 'constants/theme';2const setThemeTitleColor = (isBlack) =>3 isBlack ? blackTheme.titleColor : whiteTheme.titleColor;4const setThemeBackground = (isBlack) =>5 isBlack ? blackTheme.Background : whiteTheme.Background;6const setThemeColor = (isBlack) =>7 isBlack ? blackTheme.color : whiteTheme.color;8const setPanelBG = (isBlack) =>9 isBlack ? blackTheme.sendPanelBG : whiteTheme.sendPanelBG;10const setChatInput = (isBlack) =>11 isBlack ? blackTheme.chatInput : whiteTheme.chatInput;12const setThemePlaceHolder = (isBlack) =>13 isBlack ? blackTheme.chatPlaceHolder : whiteTheme.chatPlaceHolder;14const setThemeActiveBG = (isBlack) =>15 isBlack ? blackTheme.activeBG : whiteTheme.activeBG;16const setThemeActiveColor = (isBlack) =>17 isBlack ? blackTheme.activeColor : whiteTheme.activeColor;18const setThemeSearchBG = (isBlack) =>19 isBlack ? blackTheme.searchBG : whiteTheme.searchBG;20export {21 setThemeTitleColor,22 setThemeBackground,23 setThemeColor,24 setChatInput,25 setThemePlaceHolder,26 setPanelBG,27 setThemeActiveBG,28 setThemeActiveColor,29 setThemeSearchBG,...

Full Screen

Full Screen

DayNight.js

Source:DayNight.js Github

copy

Full Screen

1import React from "react";2class Change extends React.Component {3 state = {4 isBlack: true,5 };6 lightMode = () => {7 this.setState({ isBlack: !this.state.isBlack });8 };9 render() {10 return (11 <div12 className={`13 userName14 ${this.state.isBlack ? "white" : "black"}15 `}16 >17 <h2> {this.state.isBlack ? "Day" : "Night"}</h2>18 <button onClick={this.lightMode} style={{ margin: "5px" }}>19 {this.state.isBlack ? "to darkmode" : "to lightmode"}20 </button>21 </div>22 );23 }24}...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add('isBlack', { prevSubject: 'element' }, (subject, options) => {2 cy.get(subject).should('have.css', 'background-color', 'rgb(0, 0, 0)')3})4Cypress.Commands.add('isRed', { prevSubject: 'element' }, (subject, options) => {5 cy.get(subject).should('have.css', 'background-color', 'rgb(255, 0, 0)')6})7describe('My First Test', () => {8 it('Does not do much!', () => {9 cy.get('.square').first().click()10 cy.get('.square').first().isBlack()11 cy.get('.square').eq(1).click()12 cy.get('.square').eq(1).isRed()13 })14})15cy.get('.square').first().isBlack()16cy.get('.square').eq(1).isRed()

Full Screen

Using AI Code Generation

copy

Full Screen

1cy.get('body').then(($body) => {2 const color = new Cypress.Color($body.css('background-color'))3 expect(color.isBlack()).to.be.true4 })5Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {6 const color = new Cypress.Color(subject.css('background-color'))7 expect(color.isBlack()).to.be.true8 })9cy.get('body').isBlack()10Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {11 const color = new Cypress.Color(subject.css('background-color'))12 return color.isBlack()13 })14cy.get('body').isBlack().should('be.true')15Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {16 const color = new Cypress.Color(subject.css('background-color'))17 return color.isBlack()18 })19cy.get('body').isBlack().should('be.true')20Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {21 const color = new Cypress.Color(subject.css('background-color'))22 return color.isBlack()23 })24cy.get('body').isBlack().should('be.true')25Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {26 const color = new Cypress.Color(subject.css('background-color'))27 return color.isBlack()28 })29cy.get('body').isBlack().should('be.true')30Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {31 const color = new Cypress.Color(subject.css('background-color'))32 return color.isBlack()33 })

Full Screen

Using AI Code Generation

copy

Full Screen

1cy.get('button')2 .should('have.css', 'background-color')3 .then((color) => {4 expect(Cypress.Color.isBlack(color)).to.be.true5 })6cy.get('button')7 .should('have.css', 'background-color')8 .then((color) => {9 expect(Cypress.Color.isBlue(color)).to.be.true10 })11cy.get('button')12 .should('have.css', 'background-color')13 .then((color) => {14 expect(Cypress.Color.isBrown(color)).to.be.true15 })16cy.get('button')17 .should('have.css', 'background-color')18 .then((color) => {19 expect(Cypress.Color.isCyan(color)).to.be.true20 })21cy.get('button')22 .should('have.css', 'background-color')23 .then((color) => {24 expect(Cypress.Color.isDark(color)).to.be.true25 })26cy.get('button')27 .should('have.css', 'background-color')28 .then((color) => {29 expect(Cypress.Color.isGray(color)).to.be.true30 })31cy.get('button')32 .should('have.css', 'background-color')33 .then((color) => {34 expect(Cypress.Color.isGreen(color)).to.be.true35 })

Full Screen

Using AI Code Generation

copy

Full Screen

1var cypress = require('cypress');2var color = 'black';3if(cypress.isBlack(color)){4 console.log('The color is black');5}6else{7 console.log('The color is not black');8}

Full Screen

Using AI Code Generation

copy

Full Screen

1cy.get('div').then(($div) => {2 const color = $div.css('background-color');3 expect(color).to.be.equal('rgb(0, 0, 0)');4});5it('isBlack', () => {6 cy.get('div').isBlack();7});8Cypress.Commands.add('isBlack', { prevSubject: 'element' }, ($div) => {9 const color = $div.css('background-color');10 expect(color).to.be.equal('rgb(0, 0, 0)');11});12it('isBlack', () => {13 cy.get('div').isBlack();14});15Cypress.Commands.add('isBlack', { prevSubject: 'element' }, ($div) => {16 const color = $div.css('background-color');17 expect(color).to.be.equal('rgb(0, 0, 0)');18});19it('isBlack', () => {20 cy.get('div').isBlack();21});22Cypress.Commands.add('isBlack', { prevSubject: 'element' }, ($div) => {23 const color = $div.css('background-color');24 expect(color).to.be.equal('rgb(0, 0, 0)');25});26it('isBlack', ()

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('test', function() {2 it('test', function() {3 cy.get('.home-list > :nth-child(1) > .home-list-item > a').should('have.css', 'background-color', 'rgb(0, 0, 0)')4 cy.get('.home-list > :nth-child(2) > .home-list-item > a').should('have.css', 'background-color', 'rgb(255, 255, 255)')5 })6})7import './commands'8Cypress.Commands.add('isBlack', { prevSubject: 'element' }, (subject) => {9 cy.wrap(subject).should('have.css', 'background-color', 'rgb(0, 0, 0)')10})11Cypress.Commands.add('isWhite', { prevSubject: 'element' }, (subject) => {12 cy.wrap(subject).should('have.css', 'background-color', 'rgb(255, 255, 255)')13})14describe('test', function() {15 it('test', function() {16 cy.get('.home-list > :nth-child(1) > .home-list-item > a').isBlack()17 cy.get('.home-list > :nth-child(2) > .home-list-item > a').isWhite()18 })19})

Full Screen

Using AI Code Generation

copy

Full Screen

1it('should be black', () => {2 cy.get('p')3 .first()4 .isBlack()5 .should('be.true')6})7Cypress.Commands.add('isBlack', { prevSubject: true }, (subject) => {8 cy.wrap(subject)9 .should('have.css', 'color')10 .and('eq', 'rgb(0, 0, 0)')11})

Full Screen

Using AI Code Generation

copy

Full Screen

1cy.get('button').invoke('css', 'color').then((color) => {2 expect(color).to.be.isBlack;3});4Cypress.Commands.add('isBlack', (color) => {5 expect(color).to.eq('rgb(0, 0, 0)');6});7import './commands';8I have tried to add the command to Cypress by importing the file in support/index.js file but it is not working. I am not sure what I am missing. Can anyone help me to understand what I am missing?9cy.get('button').invoke('css', 'color').then((color) => {10 expect(color).to.be.isBlack;11});12I am trying to add the command to Cypress by importing the file in support/index.js file but it is not working. I am not sure what I am missing. Can anyone help me to understand what I am missing?13Cypress.on('uncaught:exception', (err, runnable) => {14})15cy.get('button').invoke('css', 'color').then((color) => {16 expect(color).to.be.isBlack;17});18I am trying to add the command to Cypress by importing the file in support/index.js file but it is not working. I am not sure what I am missing. Can anyone help me to understand what I am missing?19cy.get('button').invoke('css', 'color').then((color) => {20 expect(color).to.be.isBlack;21});

Full Screen

Cypress Tutorial

Cypress is a renowned Javascript-based open-source, easy-to-use end-to-end testing framework primarily used for testing web applications. Cypress is a relatively new player in the automation testing space and has been gaining much traction lately, as evidenced by the number of Forks (2.7K) and Stars (42.1K) for the project. LambdaTest’s Cypress Tutorial covers step-by-step guides that will help you learn from the basics till you run automation tests on LambdaTest.

Chapters:

  1. What is Cypress? -
  2. Why Cypress? - Learn why Cypress might be a good choice for testing your web applications.
  3. Features of Cypress Testing - Learn about features that make Cypress a powerful and flexible tool for testing web applications.
  4. Cypress Drawbacks - Although Cypress has many strengths, it has a few limitations that you should be aware of.
  5. Cypress Architecture - Learn more about Cypress architecture and how it is designed to be run directly in the browser, i.e., it does not have any additional servers.
  6. Browsers Supported by Cypress - Cypress is built on top of the Electron browser, supporting all modern web browsers. Learn browsers that support Cypress.
  7. Selenium vs Cypress: A Detailed Comparison - Compare and explore some key differences in terms of their design and features.
  8. Cypress Learning: Best Practices - Take a deep dive into some of the best practices you should use to avoid anti-patterns in your automation tests.
  9. How To Run Cypress Tests on LambdaTest? - Set up a LambdaTest account, and now you are all set to learn how to run Cypress tests.

Certification

You can elevate your expertise with end-to-end testing using the Cypress automation framework and stay one step ahead in your career by earning a Cypress certification. Check out our Cypress 101 Certification.

YouTube

Watch this 3 hours of complete tutorial to learn the basics of Cypress and various Cypress commands with the Cypress testing at LambdaTest.

Run Cypress automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful