Skip to content

Commit

Permalink
Fix exception when saving a game
Browse files Browse the repository at this point in the history
  • Loading branch information
meikpiep committed Jan 28, 2024
1 parent bc91b55 commit c9d02ee
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.piepmeyer.gauguin.creation.GridCalculator
import org.piepmeyer.gauguin.game.Game
import org.piepmeyer.gauguin.game.GameLifecycle
import org.piepmeyer.gauguin.game.GameSolveService
import org.piepmeyer.gauguin.game.save.CurrentGameSaver
import org.piepmeyer.gauguin.game.save.MigrateOldSavedGamesService
import org.piepmeyer.gauguin.game.save.SaveGame
import org.piepmeyer.gauguin.game.save.SavedGamesService
Expand All @@ -28,7 +29,7 @@ class CoreModule(
module {
single {
MigrateOldSavedGamesService(
this@CoreModule.filesDir,
filesDir,
get(ApplicationPreferences::class),
).migrateFiles()

Expand Down Expand Up @@ -58,6 +59,13 @@ class CoreModule(
single {
GameSolveService(get(Game::class))
}
single {
CurrentGameSaver(
filesDir,
get(Game::class),
get(SavedGamesService::class),
)
}
}

private fun initialGrid(): Grid {
Expand Down

0 comments on commit c9d02ee

Please sign in to comment.