generated from battlecode/battlecode22-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNav.java
executable file
·2897 lines (2789 loc) · 88 KB
/
Nav.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//https://github.com/IvanGeffner/battlecode2021/blob/master/thirtyone/BFSMuckraker.java
package thirtyone;
import battlecode.common.Direction;
import battlecode.common.MapLocation;
import battlecode.common.RobotController;
public class BFSMuckraker extends BFS {
BFSMuckraker(RobotController rc, Explore explore){
super(rc, explore);
}
static MapLocation l17;
static double v17;
static Direction d17;
static double p17;
static MapLocation l18;
static double v18;
static Direction d18;
static double p18;
static MapLocation l19;
static double v19;
static Direction d19;
static double p19;
static MapLocation l20;
static double v20;
static Direction d20;
static double p20;
static MapLocation l21;
static double v21;
static Direction d21;
static double p21;
static MapLocation l29;
static double v29;
static Direction d29;
static double p29;
static MapLocation l30;
static double v30;
static Direction d30;
static double p30;
static MapLocation l31;
static double v31;
static Direction d31;
static double p31;
static MapLocation l32;
static double v32;
static Direction d32;
static double p32;
static MapLocation l33;
static double v33;
static Direction d33;
static double p33;
static MapLocation l34;
static double v34;
static Direction d34;
static double p34;
static MapLocation l35;
static double v35;
static Direction d35;
static double p35;
static MapLocation l41;
static double v41;
static Direction d41;
static double p41;
static MapLocation l42;
static double v42;
static Direction d42;
static double p42;
static MapLocation l43;
static double v43;
static Direction d43;
static double p43;
static MapLocation l44;
static double v44;
static Direction d44;
static double p44;
static MapLocation l45;
static double v45;
static Direction d45;
static double p45;
static MapLocation l46;
static double v46;
static Direction d46;
static double p46;
static MapLocation l47;
static double v47;
static Direction d47;
static double p47;
static MapLocation l48;
static double v48;
static Direction d48;
static double p48;
static MapLocation l49;
static double v49;
static Direction d49;
static double p49;
static MapLocation l53;
static double v53;
static Direction d53;
static double p53;
static MapLocation l54;
static double v54;
static Direction d54;
static double p54;
static MapLocation l55;
static double v55;
static Direction d55;
static double p55;
static MapLocation l56;
static double v56;
static Direction d56;
static double p56;
static MapLocation l57;
static double v57;
static Direction d57;
static double p57;
static MapLocation l58;
static double v58;
static Direction d58;
static double p58;
static MapLocation l59;
static double v59;
static Direction d59;
static double p59;
static MapLocation l60;
static double v60;
static Direction d60;
static double p60;
static MapLocation l61;
static double v61;
static Direction d61;
static double p61;
static MapLocation l62;
static double v62;
static Direction d62;
static double p62;
static MapLocation l63;
static double v63;
static Direction d63;
static double p63;
static MapLocation l66;
static double v66;
static Direction d66;
static double p66;
static MapLocation l67;
static double v67;
static Direction d67;
static double p67;
static MapLocation l68;
static double v68;
static Direction d68;
static double p68;
static MapLocation l69;
static double v69;
static Direction d69;
static double p69;
static MapLocation l70;
static double v70;
static Direction d70;
static double p70;
static MapLocation l71;
static double v71;
static Direction d71;
static double p71;
static MapLocation l72;
static double v72;
static Direction d72;
static double p72;
static MapLocation l73;
static double v73;
static Direction d73;
static double p73;
static MapLocation l74;
static double v74;
static Direction d74;
static double p74;
static MapLocation l75;
static double v75;
static Direction d75;
static double p75;
static MapLocation l76;
static double v76;
static Direction d76;
static double p76;
static MapLocation l79;
static double v79;
static Direction d79;
static double p79;
static MapLocation l80;
static double v80;
static Direction d80;
static double p80;
static MapLocation l81;
static double v81;
static Direction d81;
static double p81;
static MapLocation l82;
static double v82;
static Direction d82;
static double p82;
static MapLocation l83;
static double v83;
static Direction d83;
static double p83;
static MapLocation l84;
static double v84;
static Direction d84;
static double p84;
static MapLocation l85;
static double v85;
static Direction d85;
static double p85;
static MapLocation l86;
static double v86;
static Direction d86;
static double p86;
static MapLocation l87;
static double v87;
static Direction d87;
static double p87;
static MapLocation l88;
static double v88;
static Direction d88;
static double p88;
static MapLocation l89;
static double v89;
static Direction d89;
static double p89;
static MapLocation l92;
static double v92;
static Direction d92;
static double p92;
static MapLocation l93;
static double v93;
static Direction d93;
static double p93;
static MapLocation l94;
static double v94;
static Direction d94;
static double p94;
static MapLocation l95;
static double v95;
static Direction d95;
static double p95;
static MapLocation l96;
static double v96;
static Direction d96;
static double p96;
static MapLocation l97;
static double v97;
static Direction d97;
static double p97;
static MapLocation l98;
static double v98;
static Direction d98;
static double p98;
static MapLocation l99;
static double v99;
static Direction d99;
static double p99;
static MapLocation l100;
static double v100;
static Direction d100;
static double p100;
static MapLocation l101;
static double v101;
static Direction d101;
static double p101;
static MapLocation l102;
static double v102;
static Direction d102;
static double p102;
static MapLocation l105;
static double v105;
static Direction d105;
static double p105;
static MapLocation l106;
static double v106;
static Direction d106;
static double p106;
static MapLocation l107;
static double v107;
static Direction d107;
static double p107;
static MapLocation l108;
static double v108;
static Direction d108;
static double p108;
static MapLocation l109;
static double v109;
static Direction d109;
static double p109;
static MapLocation l110;
static double v110;
static Direction d110;
static double p110;
static MapLocation l111;
static double v111;
static Direction d111;
static double p111;
static MapLocation l112;
static double v112;
static Direction d112;
static double p112;
static MapLocation l113;
static double v113;
static Direction d113;
static double p113;
static MapLocation l114;
static double v114;
static Direction d114;
static double p114;
static MapLocation l115;
static double v115;
static Direction d115;
static double p115;
static MapLocation l119;
static double v119;
static Direction d119;
static double p119;
static MapLocation l120;
static double v120;
static Direction d120;
static double p120;
static MapLocation l121;
static double v121;
static Direction d121;
static double p121;
static MapLocation l122;
static double v122;
static Direction d122;
static double p122;
static MapLocation l123;
static double v123;
static Direction d123;
static double p123;
static MapLocation l124;
static double v124;
static Direction d124;
static double p124;
static MapLocation l125;
static double v125;
static Direction d125;
static double p125;
static MapLocation l126;
static double v126;
static Direction d126;
static double p126;
static MapLocation l127;
static double v127;
static Direction d127;
static double p127;
static MapLocation l133;
static double v133;
static Direction d133;
static double p133;
static MapLocation l134;
static double v134;
static Direction d134;
static double p134;
static MapLocation l135;
static double v135;
static Direction d135;
static double p135;
static MapLocation l136;
static double v136;
static Direction d136;
static double p136;
static MapLocation l137;
static double v137;
static Direction d137;
static double p137;
static MapLocation l138;
static double v138;
static Direction d138;
static double p138;
static MapLocation l139;
static double v139;
static Direction d139;
static double p139;
static MapLocation l147;
static double v147;
static Direction d147;
static double p147;
static MapLocation l148;
static double v148;
static Direction d148;
static double p148;
static MapLocation l149;
static double v149;
static Direction d149;
static double p149;
static MapLocation l150;
static double v150;
static Direction d150;
static double p150;
static MapLocation l151;
static double v151;
static Direction d151;
static double p151;
Direction getBestDir(MapLocation target){
l84 = rc.getLocation();
v84 = 0;
l85 = l84.add(Direction.NORTH);
v85 = 1000000;
d85 = null;
l72 = l85.add(Direction.WEST);
v72 = 1000000;
d72 = null;
l71 = l72.add(Direction.SOUTH);
v71 = 1000000;
d71 = null;
l70 = l71.add(Direction.SOUTH);
v70 = 1000000;
d70 = null;
l83 = l70.add(Direction.EAST);
v83 = 1000000;
d83 = null;
l96 = l83.add(Direction.EAST);
v96 = 1000000;
d96 = null;
l97 = l96.add(Direction.NORTH);
v97 = 1000000;
d97 = null;
l98 = l97.add(Direction.NORTH);
v98 = 1000000;
d98 = null;
l99 = l98.add(Direction.NORTH);
v99 = 1000000;
d99 = null;
l86 = l99.add(Direction.WEST);
v86 = 1000000;
d86 = null;
l73 = l86.add(Direction.WEST);
v73 = 1000000;
d73 = null;
l60 = l73.add(Direction.WEST);
v60 = 1000000;
d60 = null;
l59 = l60.add(Direction.SOUTH);
v59 = 1000000;
d59 = null;
l58 = l59.add(Direction.SOUTH);
v58 = 1000000;
d58 = null;
l57 = l58.add(Direction.SOUTH);
v57 = 1000000;
d57 = null;
l56 = l57.add(Direction.SOUTH);
v56 = 1000000;
d56 = null;
l69 = l56.add(Direction.EAST);
v69 = 1000000;
d69 = null;
l82 = l69.add(Direction.EAST);
v82 = 1000000;
d82 = null;
l95 = l82.add(Direction.EAST);
v95 = 1000000;
d95 = null;
l108 = l95.add(Direction.EAST);
v108 = 1000000;
d108 = null;
l109 = l108.add(Direction.NORTH);
v109 = 1000000;
d109 = null;
l110 = l109.add(Direction.NORTH);
v110 = 1000000;
d110 = null;
l111 = l110.add(Direction.NORTH);
v111 = 1000000;
d111 = null;
l112 = l111.add(Direction.NORTH);
v112 = 1000000;
d112 = null;
l100 = l112.add(Direction.NORTHWEST);
v100 = 1000000;
d100 = null;
l87 = l100.add(Direction.WEST);
v87 = 1000000;
d87 = null;
l74 = l87.add(Direction.WEST);
v74 = 1000000;
d74 = null;
l61 = l74.add(Direction.WEST);
v61 = 1000000;
d61 = null;
l47 = l61.add(Direction.SOUTHWEST);
v47 = 1000000;
d47 = null;
l46 = l47.add(Direction.SOUTH);
v46 = 1000000;
d46 = null;
l45 = l46.add(Direction.SOUTH);
v45 = 1000000;
d45 = null;
l44 = l45.add(Direction.SOUTH);
v44 = 1000000;
d44 = null;
l43 = l44.add(Direction.SOUTH);
v43 = 1000000;
d43 = null;
l55 = l43.add(Direction.SOUTHEAST);
v55 = 1000000;
d55 = null;
l68 = l55.add(Direction.EAST);
v68 = 1000000;
d68 = null;
l81 = l68.add(Direction.EAST);
v81 = 1000000;
d81 = null;
l94 = l81.add(Direction.EAST);
v94 = 1000000;
d94 = null;
l107 = l94.add(Direction.EAST);
v107 = 1000000;
d107 = null;
l121 = l107.add(Direction.NORTHEAST);
v121 = 1000000;
d121 = null;
l122 = l121.add(Direction.NORTH);
v122 = 1000000;
d122 = null;
l123 = l122.add(Direction.NORTH);
v123 = 1000000;
d123 = null;
l124 = l123.add(Direction.NORTH);
v124 = 1000000;
d124 = null;
l125 = l124.add(Direction.NORTH);
v125 = 1000000;
d125 = null;
l113 = l125.add(Direction.NORTHWEST);
v113 = 1000000;
d113 = null;
l101 = l113.add(Direction.NORTHWEST);
v101 = 1000000;
d101 = null;
l88 = l101.add(Direction.WEST);
v88 = 1000000;
d88 = null;
l75 = l88.add(Direction.WEST);
v75 = 1000000;
d75 = null;
l62 = l75.add(Direction.WEST);
v62 = 1000000;
d62 = null;
l48 = l62.add(Direction.SOUTHWEST);
v48 = 1000000;
d48 = null;
l34 = l48.add(Direction.SOUTHWEST);
v34 = 1000000;
d34 = null;
l33 = l34.add(Direction.SOUTH);
v33 = 1000000;
d33 = null;
l32 = l33.add(Direction.SOUTH);
v32 = 1000000;
d32 = null;
l31 = l32.add(Direction.SOUTH);
v31 = 1000000;
d31 = null;
l30 = l31.add(Direction.SOUTH);
v30 = 1000000;
d30 = null;
l42 = l30.add(Direction.SOUTHEAST);
v42 = 1000000;
d42 = null;
l54 = l42.add(Direction.SOUTHEAST);
v54 = 1000000;
d54 = null;
l67 = l54.add(Direction.EAST);
v67 = 1000000;
d67 = null;
l80 = l67.add(Direction.EAST);
v80 = 1000000;
d80 = null;
l93 = l80.add(Direction.EAST);
v93 = 1000000;
d93 = null;
l106 = l93.add(Direction.EAST);
v106 = 1000000;
d106 = null;
l120 = l106.add(Direction.NORTHEAST);
v120 = 1000000;
d120 = null;
l134 = l120.add(Direction.NORTHEAST);
v134 = 1000000;
d134 = null;
l135 = l134.add(Direction.NORTH);
v135 = 1000000;
d135 = null;
l136 = l135.add(Direction.NORTH);
v136 = 1000000;
d136 = null;
l137 = l136.add(Direction.NORTH);
v137 = 1000000;
d137 = null;
l138 = l137.add(Direction.NORTH);
v138 = 1000000;
d138 = null;
l126 = l138.add(Direction.NORTHWEST);
v126 = 1000000;
d126 = null;
l114 = l126.add(Direction.NORTHWEST);
v114 = 1000000;
d114 = null;
l102 = l114.add(Direction.NORTHWEST);
v102 = 1000000;
d102 = null;
l89 = l102.add(Direction.WEST);
v89 = 1000000;
d89 = null;
l76 = l89.add(Direction.WEST);
v76 = 1000000;
d76 = null;
l63 = l76.add(Direction.WEST);
v63 = 1000000;
d63 = null;
l49 = l63.add(Direction.SOUTHWEST);
v49 = 1000000;
d49 = null;
l35 = l49.add(Direction.SOUTHWEST);
v35 = 1000000;
d35 = null;
l21 = l35.add(Direction.SOUTHWEST);
v21 = 1000000;
d21 = null;
l20 = l21.add(Direction.SOUTH);
v20 = 1000000;
d20 = null;
l19 = l20.add(Direction.SOUTH);
v19 = 1000000;
d19 = null;
l18 = l19.add(Direction.SOUTH);
v18 = 1000000;
d18 = null;
l17 = l18.add(Direction.SOUTH);
v17 = 1000000;
d17 = null;
l29 = l17.add(Direction.SOUTHEAST);
v29 = 1000000;
d29 = null;
l41 = l29.add(Direction.SOUTHEAST);
v41 = 1000000;
d41 = null;
l53 = l41.add(Direction.SOUTHEAST);
v53 = 1000000;
d53 = null;
l66 = l53.add(Direction.EAST);
v66 = 1000000;
d66 = null;
l79 = l66.add(Direction.EAST);
v79 = 1000000;
d79 = null;
l92 = l79.add(Direction.EAST);
v92 = 1000000;
d92 = null;
l105 = l92.add(Direction.EAST);
v105 = 1000000;
d105 = null;
l119 = l105.add(Direction.NORTHEAST);
v119 = 1000000;
d119 = null;
l133 = l119.add(Direction.NORTHEAST);
v133 = 1000000;
d133 = null;
l147 = l133.add(Direction.NORTHEAST);
v147 = 1000000;
d147 = null;
l148 = l147.add(Direction.NORTH);
v148 = 1000000;
d148 = null;
l149 = l148.add(Direction.NORTH);
v149 = 1000000;
d149 = null;
l150 = l149.add(Direction.NORTH);
v150 = 1000000;
d150 = null;
l151 = l150.add(Direction.NORTH);
v151 = 1000000;
d151 = null;
l139 = l151.add(Direction.NORTHWEST);
v139 = 1000000;
d139 = null;
l127 = l139.add(Direction.NORTHWEST);
v127 = 1000000;
d127 = null;
l115 = l127.add(Direction.NORTHWEST);
v115 = 1000000;
d115 = null;
try {
if (rc.onTheMap(l71)) {
if (!rc.isLocationOccupied(l71)) {
p71 = 1.0 / rc.sensePassability(l71);
if (v71 > v84 + p71) {
v71 = v84 + p71;
d71 = Direction.WEST;
}
}
}
if (rc.onTheMap(l83)) {
if (!rc.isLocationOccupied(l83)) {
p83 = 1.0 / rc.sensePassability(l83);
if (v83 > v84 + p83) {
v83 = v84 + p83;
d83 = Direction.SOUTH;
}
if (v83 > v71 + p83) {
v83 = v71 + p83;
d83 = d71;
}
}
}
if (rc.onTheMap(l85)) {
if (!rc.isLocationOccupied(l85)) {
p85 = 1.0 / rc.sensePassability(l85);
if (v85 > v84 + p85) {
v85 = v84 + p85;
d85 = Direction.NORTH;
}
if (v85 > v71 + p85) {
v85 = v71 + p85;
d85 = d71;
}
}
}
if (rc.onTheMap(l97)) {
if (!rc.isLocationOccupied(l97)) {
p97 = 1.0 / rc.sensePassability(l97);
if (v97 > v84 + p97) {
v97 = v84 + p97;
d97 = Direction.EAST;
}
if (v97 > v85 + p97) {
v97 = v85 + p97;
d97 = d85;
}
if (v97 > v83 + p97) {
v97 = v83 + p97;
d97 = d83;
}
}
}
if (rc.onTheMap(l70)) {
if (!rc.isLocationOccupied(l70)) {
p70 = 1.0 / rc.sensePassability(l70);
if (v70 > v84 + p70) {
v70 = v84 + p70;
d70 = Direction.SOUTHWEST;
}
if (v70 > v71 + p70) {
v70 = v71 + p70;
d70 = d71;
}
if (v70 > v83 + p70) {
v70 = v83 + p70;
d70 = d83;
}
}
}
if (rc.onTheMap(l72)) {
if (!rc.isLocationOccupied(l72)) {
p72 = 1.0 / rc.sensePassability(l72);
if (v72 > v84 + p72) {
v72 = v84 + p72;
d72 = Direction.NORTHWEST;
}
if (v72 > v71 + p72) {
v72 = v71 + p72;
d72 = d71;
}
if (v72 > v85 + p72) {
v72 = v85 + p72;
d72 = d85;
}
}
}
if (rc.onTheMap(l96)) {
if (!rc.isLocationOccupied(l96)) {
p96 = 1.0 / rc.sensePassability(l96);
if (v96 > v84 + p96) {
v96 = v84 + p96;
d96 = Direction.SOUTHEAST;
}
if (v96 > v97 + p96) {
v96 = v97 + p96;
d96 = d97;
}
if (v96 > v83 + p96) {
v96 = v83 + p96;
d96 = d83;
}
}
}
if (rc.onTheMap(l98)) {
if (!rc.isLocationOccupied(l98)) {
p98 = 1.0 / rc.sensePassability(l98);
if (v98 > v84 + p98) {
v98 = v84 + p98;
d98 = Direction.NORTHEAST;
}
if (v98 > v85 + p98) {
v98 = v85 + p98;
d98 = d85;
}
if (v98 > v97 + p98) {
v98 = v97 + p98;
d98 = d97;
}
}
}
if (rc.onTheMap(l58)) {
p58 = 1.0 / rc.sensePassability(l58);
if (v58 > v71 + p58) {
v58 = v71 + p58;
d58 = d71;
}
if (v58 > v70 + p58) {
v58 = v70 + p58;
d58 = d70;
}
if (v58 > v72 + p58) {
v58 = v72 + p58;
d58 = d72;
}
}
if (rc.onTheMap(l82)) {
p82 = 1.0 / rc.sensePassability(l82);
if (v82 > v83 + p82) {
v82 = v83 + p82;
d82 = d83;
}
if (v82 > v70 + p82) {
v82 = v70 + p82;
d82 = d70;
}
if (v82 > v96 + p82) {
v82 = v96 + p82;
d82 = d96;
}
}
if (rc.onTheMap(l86)) {
p86 = 1.0 / rc.sensePassability(l86);
if (v86 > v85 + p86) {
v86 = v85 + p86;
d86 = d85;
}
if (v86 > v72 + p86) {
v86 = v72 + p86;
d86 = d72;
}
if (v86 > v98 + p86) {
v86 = v98 + p86;
d86 = d98;
}
}
if (rc.onTheMap(l110)) {
p110 = 1.0 / rc.sensePassability(l110);
if (v110 > v97 + p110) {
v110 = v97 + p110;
d110 = d97;
}
if (v110 > v98 + p110) {
v110 = v98 + p110;
d110 = d98;
}
if (v110 > v96 + p110) {
v110 = v96 + p110;
d110 = d96;
}
}
if (rc.onTheMap(l57)) {
p57 = 1.0 / rc.sensePassability(l57);
if (v57 > v71 + p57) {
v57 = v71 + p57;
d57 = d71;
}
if (v57 > v70 + p57) {
v57 = v70 + p57;
d57 = d70;
}
if (v57 > v58 + p57) {
v57 = v58 + p57;
d57 = d58;
}
}
if (rc.onTheMap(l59)) {
p59 = 1.0 / rc.sensePassability(l59);
if (v59 > v71 + p59) {
v59 = v71 + p59;
d59 = d71;
}
if (v59 > v72 + p59) {
v59 = v72 + p59;
d59 = d72;
}
if (v59 > v58 + p59) {