Hex Artifact Content
Not logged in

Artifact e299f78be5d1c45f8cb229617bed723bda89e34e:


0000: 54 65 61 6d 20 22 44 61 72 6b 20 49 6e 74 65 67  Team "Dark Integ
0010: 65 72 73 22 2e 0a 0a 4d 65 6d 62 65 72 3a 0a 20  ers"...Member:. 
0020: 20 4b 61 7a 75 68 69 72 6f 20 49 6e 61 62 61 20   Kazuhiro Inaba 
0030: 28 77 77 77 2e 6b 6d 6f 6e 6f 73 2e 6e 65 74 29  (www.kmonos.net)
0040: 0a 4c 61 6e 67 75 61 67 65 3a 0a 20 20 44 20 50  .Language:.  D P
0050: 72 6f 67 72 61 6d 6d 69 6e 67 20 4c 61 6e 67 75  rogramming Langu
0060: 61 67 65 20 28 68 74 74 70 3a 2f 2f 64 6c 61 6e  age (http://dlan
0070: 67 2e 6f 72 67 29 0a 0a 54 68 69 73 20 73 75 62  g.org)..This sub
0080: 6d 69 73 73 69 6f 6e 20 66 6f 72 20 6c 69 67 68  mission for ligh
0090: 74 6e 69 6e 67 20 64 69 76 69 73 69 6f 6e 20 69  tning division i
00a0: 73 20 6e 6f 74 20 70 61 72 74 69 63 75 6c 61 72  s not particular
00b0: 79 20 69 6e 74 65 72 73 65 74 69 6e 67 2e 0a 0a  y interseting...
00c0: 2d 20 52 6f 62 6f 74 20 72 75 73 68 65 73 20 74  - Robot rushes t
00d0: 6f 20 74 68 65 20 6e 65 61 72 65 73 74 20 6c 61  o the nearest la
00e0: 6d 62 64 61 20 28 6f 72 20 74 68 65 20 6f 70 65  mbda (or the ope
00f0: 6e 20 6c 69 66 74 29 20 62 79 20 62 72 65 61 64  n lift) by bread
0100: 74 68 20 66 69 72 73 74 20 73 65 61 72 63 68 2e  th first search.
0110: 0a 20 20 2d 20 4e 6f 74 20 61 74 20 61 6c 6c 20  .  - Not at all 
0120: 74 61 6b 69 6e 67 20 69 6e 74 6f 20 61 63 63 6f  taking into acco
0130: 75 6e 74 20 74 68 65 20 64 79 6e 61 6d 69 63 73  unt the dynamics
0140: 20 28 66 61 6c 6c 69 6e 67 20 72 6f 63 6b 73 2c   (falling rocks,
0150: 20 66 6c 6f 6f 64 73 29 2e 0a 20 20 2d 20 54 6f   floods)..  - To
0160: 20 6d 69 74 69 67 61 74 65 20 74 68 65 20 73 74   mitigate the st
0170: 61 74 69 63 6e 65 73 73 2c 20 74 68 65 20 72 6f  aticness, the ro
0180: 62 6f 74 20 61 76 6f 69 64 73 20 74 68 65 20 27  bot avoids the '
0190: 2e 27 20 62 65 6c 6f 77 20 27 2a 27 20 61 73 20  .' below '*' as 
01a0: 6d 75 63 68 20 61 73 0a 20 20 20 20 70 6f 73 73  much as.    poss
01b0: 69 62 6c 65 2c 20 73 6f 20 74 68 61 74 20 69 74  ible, so that it
01c0: 20 77 6f 6e 27 74 20 66 61 6c 6c 20 6e 65 77 20   won't fall new 
01d0: 72 6f 63 6b 73 2e 0a 0a 2d 20 4f 75 74 70 75 74  rocks...- Output
01e0: 20 72 6f 75 74 69 6e 65 20 69 73 20 27 67 75 61   routine is 'gua
01f0: 72 64 65 64 27 20 62 79 20 61 20 27 73 75 64 64  rded' by a 'sudd
0200: 65 6e 20 64 65 61 74 68 27 20 6f 72 20 27 73 74  en death' or 'st
0210: 72 61 79 20 73 68 65 65 70 27 20 64 65 74 65 63  ray sheep' detec
0220: 74 6f 72 2e 0a 20 20 54 68 61 74 20 69 73 2c 20  tor..  That is, 
0230: 69 66 20 74 68 65 20 61 62 6f 76 65 20 73 65 61  if the above sea
0240: 72 63 68 20 72 6f 75 74 69 6e 65 20 77 61 73 20  rch routine was 
0250: 68 69 74 20 62 79 20 61 20 72 6f 63 6b 20 6f 72  hit by a rock or
0260: 20 61 20 77 61 74 65 72 2c 20 6f 72 20 69 74 0a   a water, or it.
0270: 20 20 63 6f 75 6c 64 6e 27 74 20 66 69 6e 64 20    couldn't find 
0280: 61 20 77 61 79 20 74 6f 20 74 68 65 20 6e 65 78  a way to the nex
0290: 74 20 74 61 72 67 65 74 20 61 6e 64 20 77 61 6c  t target and wal
02a0: 6b 65 64 20 69 6e 20 76 61 69 6e 2c 20 74 68 65  ked in vain, the
02b0: 20 6f 75 74 70 75 74 20 67 75 61 72 64 73 0a 20   output guards. 
02c0: 20 74 72 69 6d 73 20 74 68 65 20 63 6f 6d 6d 61   trims the comma
02d0: 6e 64 20 68 69 73 74 6f 72 79 20 61 6e 64 20 69  nd history and i
02e0: 6e 73 65 72 74 73 20 74 68 65 20 27 41 27 62 6f  nserts the 'A'bo
02f0: 72 74 20 61 74 20 74 68 65 20 6f 70 74 69 6d 61  rt at the optima
0300: 6c 20 74 69 6d 69 6e 67 2e 0a 20 20 54 68 69 73  l timing..  This
0310: 20 69 73 20 61 6c 73 6f 20 75 73 65 64 20 66 6f   is also used fo
0320: 72 20 53 49 47 49 4e 54 20 68 61 6e 64 6c 69 6e  r SIGINT handlin
0330: 67 2e 0a 0a 2d 20 67 75 69 2e 64 20 69 73 20 61  g...- gui.d is a
0340: 20 77 69 6e 64 6f 77 73 20 47 55 49 20 66 6f 72   windows GUI for
0350: 20 74 68 65 20 67 61 6d 65 2c 20 75 73 69 6e 67   the game, using
0360: 20 44 46 4c 20 28 68 74 74 70 3a 2f 2f 67 69 74   DFL (http://git
0370: 68 75 62 2e 63 6f 6d 2f 52 61 79 65 72 64 2f 64  hub.com/Rayerd/d
0380: 66 6c 29 0a 20 20 69 74 20 69 73 20 6e 6f 74 20  fl).  it is not 
0390: 63 6f 6d 70 69 6c 65 64 20 69 6e 74 6f 20 74 68  compiled into th
03a0: 65 20 73 75 62 6d 69 74 74 65 64 20 72 6f 75 74  e submitted rout
03b0: 69 6e 65 2e 20 54 68 69 73 20 69 73 20 6a 75 73  ine. This is jus
03c0: 74 20 61 20 68 65 6c 70 65 72 2e 0a 0a 53 74 61  t a helper...Sta
03d0: 79 20 74 75 6e 65 64 20 66 6f 72 20 74 68 65 20  y tuned for the 
03e0: 66 75 6c 6c 20 73 75 62 6d 69 73 73 69 6f 6e 2c  full submission,
03f0: 20 6a 75 64 67 65 73 21 0a 0a                     judges!..