Skip to content

Instantly share code, notes, and snippets.

@ciriti
Created November 29, 2018 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ciriti/2744528ff637345a0192fc8488e10c91 to your computer and use it in GitHub Desktop.
Save ciriti/2744528ff637345a0192fc8488e10c91 to your computer and use it in GitHub Desktop.
A. From kotlin online compiler
@Test
fun `Mark way around wall 2`() {
val mapString = """
......X...B.........
..........B.........
........BBB....S....
....................
""".trimIndent()
val marked = """
......*...B.........
.......*..B.........
.......*BBB*****....
........***.........
""".trimIndent()
assertEquals(marked, addPath(mapString))
}
B. From the git link
@Test
fun `Mark way around wall 2`() {
val mapString = """
..........B.........
......X...B.........
..........B.........
........BBB....S....
....................
""".trimIndent()
val marked = """
..........B.........
......*...B.........
......*...B.........
.......*BBB*****....
........***.........
""".trimIndent()
assertEquals(marked, addPath(mapString))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment