Kotlin: How do i implement the counter for my twodimensional array? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Kotlin: How do i implement the counter for my twodimensional array?

Hey guys, i was trying to make a TicTacToe as an exercise for Kotlin. As you can see i'm pretty far at getting it to work. My only problem is that i don't know how i implement the counter in the right way at line 80. If I add just the "i" the error says: "Type mismatch: inferred type is Array<Int> but Int was expected". Do you have an idea how to fix that? The code is here: https://code.sololearn.com/cA23a12a213A

24th Mar 2021, 3:24 PM
Lars H
1 Answer
+ 1
Seems to be quite the answer. A big big thank you to you! I'll test it later, thank you
25th Mar 2021, 4:32 PM
Lars H