fix: door spawn required wall be exist on the cells that don't matter

This commit is contained in:
minjaesong
2024-01-21 03:51:08 +09:00
parent 3da37408a2
commit d927d1d240
3 changed files with 34 additions and 7 deletions

View File

@@ -1013,3 +1013,9 @@ fun distBetween(a: ActorWithBody, bpos: Vector2): Double {
}
const val hashStrMap = "YBNDRFG8EJKMCPQXOTLVWIS2A345H769"
fun getHashStr(length: Int = 5) = (0 until length).map { hashStrMap[Math.random().times(32).toInt()] }.joinToString("")
fun <S, T> List<S>.cartesianProduct(other: List<T>) = this.flatMap { thisIt ->
other.map { otherIt ->
thisIt to otherIt
}
}