Implementing Flood Fill Algorithm in Kotlin
import java.util.Queue
import java.util.LinkedList
fun explore(row: Int, column: Int) {
val length1 = minefield.size
val length2 = minefield[0].size
if (displayedMinefield[row][column] == "/") return
val queue: Queue = LinkedList()
queue.add(listOf(row, column))
while (!queue.isEmpty()) {
val (i, j) = queue.first
queue.removeFirst()
if (i < 0 || i >= length1 || j < 0 || j >= length2) {
continue
} else {
if...