Modern Apps git

← Modern-Apps.git

wordmaker: fix build after canonical migration

Commit
96caccf7830ad353fe4d3e6d0c80d0ba1d236689
Author
vayun-mathur <[email protected]>
When
2026-08-15 22:14 UTC (3 months ago)
Parents
fdcc9f4

Diff

games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/platform/WordMakerViewModel.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/platform/WordMakerViewModel.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/platform/WordMakerViewModel.ktindex 1ff530b888..fafdc375ac 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/platform/WordMakerViewModel.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/platform/WordMakerViewModel.kt@@ -8,7 +8,9 @@ import com.vayunmathur.games.wordmaker.R import com.vayunmathur.games.wordmaker.data.CrosswordData import com.vayunmathur.games.wordmaker.data.Difficulty import com.vayunmathur.games.wordmaker.data.GameMode-import com.vayunmathur.games.wordmaker.data.LevelDataStore`nimport com.vayunmathur.games.wordmaker.domain.CompetitiveLevelGenerator`nimport com.vayunmathur.games.wordmaker.domain.Dictionary+import com.vayunmathur.games.wordmaker.data.LevelDataStore+import com.vayunmathur.games.wordmaker.domain.CompetitiveLevelGenerator+import com.vayunmathur.games.wordmaker.domain.Dictionary import com.vayunmathur.library.util.DailyChallengeStore import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.Flow
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/CompetitiveLobbyScreen.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/CompetitiveLobbyScreen.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/CompetitiveLobbyScreen.ktindex 239a907151..0adf738def 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/CompetitiveLobbyScreen.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/CompetitiveLobbyScreen.kt@@ -27,6 +27,7 @@ import com.vayunmathur.games.wordmaker.ui.components.DifficultyDropdown import com.vayunmathur.games.wordmaker.ui.components.WordMakerTopBar import com.vayunmathur.library.ui.ExperimentalMaterial3Api +@Composable fun CompetitiveLobbyPage(     viewModel: WordMakerViewModel,     onOpenGameCenter: () -> Unit,@@ -51,6 +52,7 @@ fun CompetitiveLobbyPage( }  +@Composable fun CompetitiveLobbyScreen(     state: CompetitiveLobbyUiState,     actions: CompetitiveLobbyActions,
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGamePage.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGamePage.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGamePage.ktindex b0e4413afb..b749e322a5 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGamePage.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGamePage.kt@@ -6,11 +6,13 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import com.vayunmathur.games.wordmaker.data.CrosswordData+import com.vayunmathur.games.wordmaker.data.GameMode import com.vayunmathur.games.wordmaker.platform.WordGameActions import com.vayunmathur.games.wordmaker.platform.WordGameUiState import com.vayunmathur.games.wordmaker.platform.WordMakerViewModel import com.vayunmathur.library.util.AchievementsManager +@Composable fun WordGamePage(     crosswordData: CrosswordData,     currentLevel: Int,
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGameScreen.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGameScreen.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGameScreen.ktindex 4fc62f0521..09f038bf35 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGameScreen.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordGameScreen.kt@@ -66,12 +66,14 @@ import com.vayunmathur.games.wordmaker.ui.components.CompetitiveStatusBar import com.vayunmathur.games.wordmaker.ui.components.CrosswordBoard import com.vayunmathur.games.wordmaker.ui.components.DailyStatusBar import com.vayunmathur.games.wordmaker.ui.components.LetterChooser+import com.vayunmathur.games.wordmaker.ui.components.WordMakerTopBar import com.vayunmathur.games.wordmaker.ui.dialogs.BonusWordsDialog import com.vayunmathur.games.wordmaker.ui.dialogs.DefinitionDialog import kotlinx.coroutines.delay import kotlinx.coroutines.joinAll import kotlinx.coroutines.launch +@Composable fun WordGameScreen(     state: WordGameUiState,     actions: WordGameActions,
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordMakerGameLoader.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordMakerGameLoader.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordMakerGameLoader.ktindex fbfba40186..b8816ba785 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordMakerGameLoader.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/WordMakerGameLoader.kt@@ -19,6 +19,7 @@ import com.vayunmathur.games.wordmaker.rememberAchievementsManager import com.vayunmathur.library.ui.AchievementNotification import com.vayunmathur.library.util.NavBackStack +@Composable fun WordMakerGameLoader(backStack: NavBackStack<Route>, viewModel: WordMakerViewModel) {     val currentLevel by viewModel.currentLevel.collectAsState()     val crosswordData by viewModel.crosswordData.collectAsState()
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/CrosswordBoard.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/CrosswordBoard.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/CrosswordBoard.ktindex ecc9cf67c8..e8428d4ef2 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/CrosswordBoard.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/CrosswordBoard.kt@@ -33,6 +33,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.vayunmathur.games.wordmaker.data.CrosswordData +@Composable fun CrosswordBoard(     foundWords: Set<String>,     revealedHints: Set<Pair<Int, Int>>,
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/LetterChooser.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/LetterChooser.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/LetterChooser.ktindex 68616bef90..c84c805095 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/LetterChooser.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/LetterChooser.kt@@ -16,6 +16,8 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape+import androidx.compose.material3.FilledIconButton+import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text@@ -50,6 +52,7 @@ import kotlin.math.cos import kotlin.math.roundToInt import kotlin.math.sin +@Composable fun LetterChooser(     letters: List<ChooserLetter>,     tapToSpell: Boolean,
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordComponents.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordComponents.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordComponents.ktindex 37ab6be8c6..0411c42d95 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordComponents.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordComponents.kt@@ -31,6 +31,7 @@ data class AnimatedLetter( data class WordToAnimate(val word: String, val letterIds: List<Int>)  +@Composable fun SurfaceText(modifier: Modifier, surfaceShape: Shape, surfaceColor: Color, text: String, textModifier: Modifier, fontWeight: FontWeight? = null, fontSize: TextUnit = TextUnit.Unspecified, surfaceSize: Dp?, textColor: Color = Color.Unspecified) {     val modifier2 = if(surfaceSize != null) modifier.size(surfaceSize) else modifier     Surface(modifier2, surfaceShape, surfaceColor) {
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordMakerTopBar.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordMakerTopBar.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordMakerTopBar.ktindex 11efdbd1f9..fc49a96a11 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordMakerTopBar.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/components/WordMakerTopBar.kt@@ -31,6 +31,7 @@ import com.vayunmathur.library.ui.IconButton import com.vayunmathur.library.ui.IconSettings import com.vayunmathur.library.ui.TextButton +@Composable fun GameModeDropdown(selected: GameMode, onSelected: (GameMode) -> Unit) {     var expanded by remember { mutableStateOf(false) }     Box {@@ -52,13 +53,6 @@ fun GameModeDropdown(selected: GameMode, onSelected: (GameMode) -> Unit) {     } } -private fun gameModeLabel(mode: GameMode) = when (mode) {-    GameMode.CASUAL -> R.string.mode_casual-    GameMode.COMPETITIVE -> R.string.mode_competitive-    GameMode.DAILY -> R.string.mode_daily-}-- private fun gameModeLabel(mode: GameMode) = when (mode) {     GameMode.CASUAL -> R.string.mode_casual     GameMode.COMPETITIVE -> R.string.mode_competitive@@ -80,6 +74,7 @@ fun DailyStatusBar(streak: Long) { }  +@Composable fun DifficultyDropdown(selected: Difficulty, onSelected: (Difficulty) -> Unit) {     var expanded by remember { mutableStateOf(false) }     fun label(d: Difficulty) = when (d) {@@ -140,6 +135,7 @@ fun WordMakerTopBar( }  +@Composable fun CompetitiveStatusBar(     score: Int,     remainingTimeMs: Long
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/dialogs/WordDialogs.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/dialogs/WordDialogs.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/dialogs/WordDialogs.ktindex d269049285..df27e3a509 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/dialogs/WordDialogs.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/dialogs/WordDialogs.kt@@ -22,6 +22,7 @@ import com.vayunmathur.library.ui.AlertDialog import com.vayunmathur.library.ui.Button import com.vayunmathur.library.ui.R as UiR +@Composable fun DefinitionDialog(word: String, definition: List<String>, onDismiss: () -> Unit) {     AlertDialog(         onDismissRequest = onDismiss,@@ -40,6 +41,7 @@ fun DefinitionDialog(word: String, definition: List<String>, onDismiss: () -> Un }  +@Composable fun BonusWordsDialog(     bonusWords: Set<String>,     getDefinition: (String) -> List<String>,