diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverter.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverter.kt index c55569cc..06809423 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverter.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverter.kt @@ -12,6 +12,7 @@ class DifficultyConverter { 1 -> Difficulty.Beginner 2 -> Difficulty.Intermediate 3 -> Difficulty.Expert + 4 -> Difficulty.Custom else -> throw IllegalArgumentException("Could not recognize Difficulty") } diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverterTest.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverterTest.kt index 2d35ebee..5650e4e3 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverterTest.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/database/converters/DifficultyConverterTest.kt @@ -13,6 +13,7 @@ class DifficultyConverterTest { assertEquals(converter.toDifficulty(1), Difficulty.Beginner) assertEquals(converter.toDifficulty(2), Difficulty.Intermediate) assertEquals(converter.toDifficulty(3), Difficulty.Expert) + assertEquals(converter.toDifficulty(4), Difficulty.Custom) } @Test(expected = IllegalArgumentException::class) @@ -28,5 +29,6 @@ class DifficultyConverterTest { assertEquals(converter.toInteger(Difficulty.Beginner), 1) assertEquals(converter.toInteger(Difficulty.Intermediate), 2) assertEquals(converter.toInteger(Difficulty.Expert), 3) + assertEquals(converter.toInteger(Difficulty.Custom), 4) } }