Skip to content

Commit f0eaf4a

Browse files
authored
Update README.md
1 parent 9c0cf52 commit f0eaf4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Kotlin Multiplatform sample heavily inspired by [Wordle](https://www.powerlangua
1818
The shared `WordMasterService` class includes following `StateFlow`s representing the current set of guesses and updated status info for each letter.
1919

2020
```
21-
val boardGuesses = MutableStateFlow<ArrayList<ArrayList<String>>>(arrayListOf())
22-
val boardStatus = MutableStateFlow<ArrayList<ArrayList<LetterStatus>>>(arrayListOf())
21+
val boardGuesses = StateFlow<ArrayList<ArrayList<String>>>()
22+
val boardStatus = StateFlow<ArrayList<ArrayList<LetterStatus>>>()
2323
```
2424

2525
The various clients call `WordService.setGuess()` when a user enters a letter and then `WordService.checkGuess()` after row of letters
@@ -29,8 +29,8 @@ are entered...UI then reflects any resulting updates to above `StateFlow`'s. Th
2929
val boardGuesses by wordMasterService.boardGuesses.collectAsState()
3030
val boardStatus by wordMasterService.boardStatus.collectAsState()
3131
```
32-
<br>
33-
On iOS we're using [KMP-NativeCoroutines](https://github.com/rickclephas/KMP-NativeCoroutines) library to map the `StateFlow` to Swift `AsyncSequence`. So, for example, our Swift view model includes
32+
<br/>
33+
On iOS we're using the [KMP-NativeCoroutines](https://github.com/rickclephas/KMP-NativeCoroutines) library to map the `StateFlow` to Swift `AsyncSequence`. So, for example, our Swift view model includes
3434

3535
```
3636
@Published public var boardStatus: [[LetterStatus]] = []

0 commit comments

Comments
 (0)