package Ġcom . github . sh mv anh out en . ad vent of code . day 1 7 tw ost eps forward Ċ Ċ import Ġcom . nat pr y ce . ham k rest . assertion . assertThat Ċ import Ġcom . nat pr y ce . ham k rest . equalTo Ċ import Ġorg . junit . Test Ċ Ċ class ĠShort est Path To Vault Finder Test Ġ{ ĊĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġfind Ġthe Ġquick est Ġpath Ġto Ġthe Ġvault Ġto Ġbe ĠDR `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroom Map Ġ= Ġbuild Small Room Map () ĊĠĠĠĠĠĠĠ Ġval Ġdoor Lock State Asc ert ainer Ġ= ĠDoor Lock State Decoder Mock Impl () ĊĠĠĠĠĠĠĠ Ġval Ġshortest Path Finder Ġ= ĠShort est Path To Vault Finder ( room Map , Ġdoor Lock State Asc ert ainer ) ĊĠĠĠĠĠĠĠ ĠassertThat ( short est Path Finder . find (" 1 2 3 4 "), ĠequalTo (" DR ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġfind Ġthe Ġpath ĠD DR RR D Ġfor Ġpass code Ġih gp wl ah `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroom Map Ġ= Ġbuild Standard Room Map () ĊĠĠĠĠĠĠĠ Ġval Ġdoor Lock State Asc ert ainer Ġ= ĠDoor Lock State Decoder Md 5 Impl () ĊĠĠĠĠĠĠĠ Ġval Ġshortest Path Finder Ġ= ĠShort est Path To Vault Finder ( room Map , Ġdoor Lock State Asc ert ainer ) ĊĠĠĠĠĠĠĠ ĠassertThat ( short est Path Finder . find (" ih gp wl ah "), ĠequalTo (" DD RR RD ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġfind Ġthe Ġpath ĠDD UD RL RR U DR D Ġfor Ġpass code Ġk gl v qr ro `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroom Map Ġ= Ġbuild Standard Room Map () ĊĠĠĠĠĠĠĠ Ġval Ġdoor Lock State Asc ert ainer Ġ= ĠDoor Lock State Decoder Md 5 Impl () ĊĠĠĠĠĠĠĠ Ġval Ġshortest Path Finder Ġ= ĠShort est Path To Vault Finder ( room Map , Ġdoor Lock State Asc ert ainer ) ĊĠĠĠĠĠĠĠ ĠassertThat ( short est Path Finder . find (" k gl v qr ro "), ĠequalTo (" DD UD RL RR U DR D ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġfind Ġthe Ġpath ĠDR UR DR U DD LL DL U UR RD UL RL DU U DD DR R Ġfor Ġpass code Ġul q zk m iv `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroom Map Ġ= Ġbuild Standard Room Map () ĊĠĠĠĠĠĠĠ Ġval Ġdoor Lock State Asc ert ainer Ġ= ĠDoor Lock State Decoder Md 5 Impl () ĊĠĠĠĠĠĠĠ Ġval Ġshortest Path Finder Ġ= ĠShort est Path To Vault Finder ( room Map , Ġdoor Lock State Asc ert ainer ) ĊĠĠĠĠĠĠĠ ĠassertThat ( short est Path Finder . find (" ul q zk m iv "), ĠequalTo (" DR UR DR U DD LL DL U UR RD UL RL DU U DD DR R ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġfind Ġthe Ġpath ĠDD UR RL RR DD Ġfor Ġchallenge Ġinput Ġpass code Ġb wn l cv fs `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroom Map Ġ= Ġbuild Standard Room Map () ĊĠĠĠĠĠĠĠ Ġval Ġdoor Lock State Asc ert ainer Ġ= ĠDoor Lock State Decoder Md 5 Impl () ĊĠĠĠĠĠĠĠ Ġval Ġshortest Path Finder Ġ= ĠShort est Path To Vault Finder ( room Map , Ġdoor Lock State Asc ert ainer ) ĊĠĠĠĠĠĠĠ ĠassertThat ( short est Path Finder . find (" b wn l cv fs "), ĠequalTo (" DD UR RL RR DD ")) ĊĠĠĠ Ġ} ĊĊĊĊĊĠĠĠ Ġprivate Ġfun Ġbuild Small Room Map (): ĠRoom Map Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroom Map Builder Ġ= ĠRoom Map Builder () ĊĠĠĠĠĠĠĠ Ġval Ġraw Input Ġ= Ġ""" ##### ĊĠĠĠ Ġ# S | Ġ# ĊĠĠĠ Ġ# - #- # ĊĠĠĠ Ġ# Ġ| Ġ# ĊĠĠĠ Ġ### V """ ĊĠĠĠĠĠĠĠ Ġreturn Ġroom Map Builder . build Room Map ( raw Input ) ĊĠĠĠ Ġ} ĊĊ Ċ } Ċ Ċ fun Ġbuild Standard Room Map (): ĠRoom Map Ġ{ ĊĠĠĠ Ġval Ġroom Map Builder Ġ= ĠRoom Map Builder () ĊĠĠĠ Ġval Ġraw Input Ġ= Ġ""" ######## # ĊĠĠĠ Ġ# S | Ġ| Ġ| Ġ# ĊĠĠĠ Ġ# - #- #- #- # ĊĠĠĠ Ġ# Ġ| Ġ| Ġ| Ġ# ĊĠĠĠ Ġ# - #- #- #- # ĊĠĠĠ Ġ# Ġ| Ġ| Ġ| Ġ# ĊĠĠĠ Ġ# - #- #- #- # ĊĠĠĠ Ġ# Ġ| Ġ| Ġ| ĊĠĠĠ Ġ#### ### ĠV """ ĊĠĠĠ Ġreturn Ġroom Map Builder . build Room Map ( raw Input ) Ċ }