diff --git a/src/main/kotlin/board/Matrix.kt b/src/main/kotlin/board/Matrix.kt index 92a7418..275d247 100644 --- a/src/main/kotlin/board/Matrix.kt +++ b/src/main/kotlin/board/Matrix.kt @@ -29,7 +29,7 @@ class Matrix( override fun next(): T { if (!this.hasNext()) throw NoSuchElementException() - return entries[idx / n][idx++ % m] + return entries[idx / m][idx++ % m] } }