mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
fix: door spawn required wall be exist on the cells that don't matter
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user