├── screenshot.png
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── app
└── src
│ └── main
│ ├── ic_launcher-playstore.png
│ ├── res
│ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ ├── values
│ │ ├── attrs.xml
│ │ ├── dimens.xml
│ │ ├── integers.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── styles.xml
│ │ ├── ids.xml
│ │ ├── shape.xml
│ │ ├── colors.xml
│ │ └── type.xml
│ ├── values-v23
│ │ └── colors.xml
│ ├── values-v27
│ │ └── colors.xml
│ ├── color
│ │ └── csl_secondary_enabled.xml
│ ├── layout
│ │ ├── fragment_chart.xml
│ │ ├── list_item_lap_universal.xml
│ │ ├── fragment_nav_drawer.xml
│ │ ├── list_item_lap_result.xml
│ │ ├── fragment_color_picker.xml
│ │ ├── tools_linearlistview_preview.xml
│ │ ├── list_item_color.xml
│ │ ├── list_item_lap_belote_coinche.xml
│ │ ├── dialog_edit_name.xml
│ │ ├── list_item_edition_bonus.xml
│ │ ├── activity_saved_games.xml
│ │ ├── activity_edition_universal.xml
│ │ └── list_item_saved_games.xml
│ ├── drawable
│ │ ├── ic_circle_color.xml
│ │ ├── ic_minus_24dp.xml
│ │ ├── ic_arrow_drop_down_24dp.xml
│ │ ├── ic_plus_24dp.xml
│ │ ├── ic_done_24dp.xml
│ │ ├── ic_menu_24dp.xml
│ │ ├── ic_list_24dp.xml
│ │ ├── ic_clear_all_24dp.xml
│ │ ├── ic_arrow_back_24dp.xml
│ │ ├── ic_delete_24dp.xml
│ │ ├── ic_swap_horiz_24dp.xml
│ │ ├── ic_show_chart_24dp.xml
│ │ ├── ic_messenger_24dp.xml
│ │ ├── ic_beer_24dp.xml
│ │ ├── ic_donate_coffee_24dp.xml
│ │ ├── ic_email_24dp.xml
│ │ ├── ic_edit_24dp.xml
│ │ ├── ic_cancel_24dp.xml
│ │ ├── ic_heart_24dp.xml
│ │ ├── ic_baseline_rate_review_24dp.xml
│ │ ├── ic_refresh_24dp.xml
│ │ ├── ic_backspace_24dp.xml
│ │ ├── ic_unarchive_24dp.xml
│ │ ├── ic_people_24dp.xml
│ │ └── ic_github_24dp.xml
│ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ ├── anim
│ │ ├── fade_out.xml
│ │ └── fade_in.xml
│ ├── menu
│ │ ├── menu_edition.xml
│ │ ├── menu_main.xml
│ │ └── nav_drawer.xml
│ └── values-night
│ │ ├── themes.xml
│ │ └── colors.xml
│ └── kotlin
│ └── com
│ └── sbgapps
│ └── scoreit
│ └── app
│ ├── ui
│ ├── edition
│ │ └── Step.kt
│ ├── history
│ │ └── adapter
│ │ │ ├── BaseLapAdapter.kt
│ │ │ ├── LapResultAdapter.kt
│ │ │ ├── UniversalLapAdapter.kt
│ │ │ ├── BeloteLapAdapter.kt
│ │ │ ├── CoincheLapAdapter.kt
│ │ │ ├── TarotLapAdapter.kt
│ │ │ ├── DonationAdapter.kt
│ │ │ └── HeaderAdapter.kt
│ ├── color
│ │ ├── ColorAdapter.kt
│ │ └── ColorPickerFragment.kt
│ ├── saved
│ │ └── SavedGameAdapter.kt
│ ├── prefs
│ │ └── PreferencesViewModel.kt
│ ├── widget
│ │ └── AdaptableLinearLayout.kt
│ ├── chart
│ │ ├── ChartFragment.kt
│ │ └── ChartViewModel.kt
│ └── NavDrawerFragment.kt
│ ├── model
│ ├── SavedGame.kt
│ ├── Header.kt
│ └── LapRow.kt
│ ├── ScoreItApp.kt
│ └── di
│ └── UiModule.kt
├── .gitignore
├── .gitattributes
├── cache
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ └── arrays.xml
│ │ └── values-fr
│ │ │ └── strings.xml
│ │ └── kotlin
│ │ └── com
│ │ └── sbgapps
│ │ └── scoreit
│ │ └── cache
│ │ └── repository
│ │ └── ScoreItBillingRepo.kt
└── build.gradle.kts
├── core
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ └── com
│ │ │ └── sbgapps
│ │ │ └── scoreit
│ │ │ └── core
│ │ │ ├── ui
│ │ │ ├── BaseFragment.kt
│ │ │ └── BaseActivity.kt
│ │ │ ├── utils
│ │ │ ├── ApiHelper.kt
│ │ │ ├── string
│ │ │ │ ├── StringFactory.kt
│ │ │ │ ├── StringFactoryInterpreter.kt
│ │ │ │ └── StringFactoryDsl.kt
│ │ │ └── ThemeHelper.kt
│ │ │ ├── ext
│ │ │ ├── DiffUtil.kt
│ │ │ ├── Collection.kt
│ │ │ ├── Fragment.kt
│ │ │ ├── LifecycleOwner.kt
│ │ │ ├── Menu.kt
│ │ │ ├── String.kt
│ │ │ ├── List.kt
│ │ │ ├── View.kt
│ │ │ └── FragmentActivity.kt
│ │ │ └── widget
│ │ │ ├── BaseViewHolder.kt
│ │ │ ├── ItemAdapter.kt
│ │ │ ├── AppBarRecyclerViewOnScrollListener.kt
│ │ │ ├── AppBarNestedScrollViewOnScrollListener.kt
│ │ │ ├── GenericRecyclerViewAdapter.kt
│ │ │ ├── ErrorView.kt
│ │ │ └── DividerItemDecoration.kt
│ │ └── res
│ │ ├── values-v29
│ │ └── strings.xml
│ │ ├── anim
│ │ ├── fade_out.xml
│ │ ├── layout_animation_fall_down.xml
│ │ ├── fade_in.xml
│ │ └── item_animation_fall_down.xml
│ │ ├── values
│ │ ├── ids.xml
│ │ ├── dimens.xml
│ │ └── strings.xml
│ │ ├── drawable
│ │ ├── ic_error_outline_black_24dp.xml
│ │ └── ic_signal_cellular_connected_no_internet_0_bar_black_24dp.xml
│ │ ├── values-fr
│ │ └── strings.xml
│ │ └── layout
│ │ └── widget_error_view.xml
└── build.gradle.kts
├── data
├── src
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── sbgapps
│ │ │ │ └── scoreit
│ │ │ │ └── data
│ │ │ │ ├── model
│ │ │ │ ├── SavedGameInfo.kt
│ │ │ │ ├── Player.kt
│ │ │ │ ├── GameType.kt
│ │ │ │ ├── TarotOudlerValue.kt
│ │ │ │ ├── TarotBonus.kt
│ │ │ │ ├── BeloteBonus.kt
│ │ │ │ ├── ScoreBoard.kt
│ │ │ │ ├── PlayerPosition.kt
│ │ │ │ ├── CoincheValue.kt
│ │ │ │ ├── TarotBidValue.kt
│ │ │ │ ├── BeloteBonusValue.kt
│ │ │ │ ├── TarotBonusValue.kt
│ │ │ │ ├── Game.kt
│ │ │ │ └── Lap.kt
│ │ │ │ ├── repository
│ │ │ │ ├── BillingRepo.kt
│ │ │ │ ├── CacheRepo.kt
│ │ │ │ └── PreferencesRepo.kt
│ │ │ │ ├── interactor
│ │ │ │ └── ScoreBoardUseCase.kt
│ │ │ │ ├── solver
│ │ │ │ └── UniversalSolver.kt
│ │ │ │ └── di
│ │ │ │ └── DataModule.kt
│ │ └── res
│ │ │ ├── values-fr
│ │ │ └── strings.xml
│ │ │ └── values
│ │ │ └── strings.xml
│ └── test
│ │ └── java
│ │ └── com
│ │ └── sbgapps
│ │ └── scoreit
│ │ └── data
│ │ └── solver
│ │ └── UniversalSolverTest.kt
└── build.gradle.kts
├── settings.gradle.kts
├── gradle.properties
└── README.md
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/screenshot.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephaneBg/ScoreIt/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 |
4 | # files for the dex VM
5 | *.dex
6 |
7 | # Java class files
8 | *.class
9 |
10 | # generated files
11 | bin/
12 | gen/
13 | *.aab
14 |
15 | # Local configuration file
16 | local.properties
17 |
18 | # Intellij project files
19 | *.iml
20 | *.ipr
21 | *.iws
22 | .idea/
23 | *.prefs
24 |
25 | # Gradle
26 | build/
27 | .gradle
28 |
29 | # Signing
30 | key
31 | signing.gradle
32 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/cache/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/core/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/data/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v23/colors.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | @color/md_grey_50
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | 92dp
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v27/colors.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | @color/md_grey_50
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | 150
19 | 300
20 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #FAFAFA
20 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/ui/BaseFragment.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.ui
18 |
19 | import androidx.fragment.app.Fragment
20 |
21 | open class BaseFragment : Fragment()
22 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/sbgapps/scoreit/app/ui/edition/Step.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.app.ui.edition
18 |
19 | data class Step(
20 | val canAdd: Boolean,
21 | val canSubtract: Boolean
22 | )
23 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/utils/ApiHelper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.utils
18 |
19 | import android.os.Build
20 |
21 | fun isQOrAbove(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/sbgapps/scoreit/app/model/SavedGame.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.app.model
18 |
19 | data class SavedGame(
20 | val fileName: String,
21 | val players: String,
22 | val date: String
23 | )
24 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/ext/DiffUtil.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.ext
18 |
19 | import androidx.recyclerview.widget.DiffUtil
20 |
21 | fun DiffUtil.Callback.calculateDiff() = DiffUtil.calculateDiff(this)
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/SavedGameInfo.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | data class SavedGameInfo(
20 | val fileName: String,
21 | val players: String,
22 | val timeStamp: Long
23 | )
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2020 Stéphane Baiget
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 | distributionBase=GRADLE_USER_HOME
17 | distributionPath=wrapper/dists
18 | zipStoreBase=GRADLE_USER_HOME
19 | zipStorePath=wrapper/dists
20 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
21 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | dependencyResolutionManagement {
18 | repositories {
19 | mavenCentral()
20 | google()
21 | }
22 | }
23 |
24 | include(
25 | ":app",
26 | ":data",
27 | ":cache",
28 | ":core"
29 | )
30 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/ext/Collection.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.ext
18 |
19 | infix fun Collection.sameContentWith(collection: Collection) =
20 | collection.let { this.size == it.size && this.containsAll(it) }
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/ext/Fragment.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.ext
18 |
19 | import android.view.View
20 | import androidx.fragment.app.Fragment
21 |
22 | inline fun Fragment.find(id: Int): T = view?.findViewById(id) as T
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/Player.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | import com.squareup.moshi.JsonClass
20 |
21 | @JsonClass(generateAdapter = true)
22 | data class Player(
23 | val name: String,
24 | val color: Int
25 | )
26 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2020 Stéphane Baiget
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | org.gradle.jvmargs=-Xmx4096m -XX\:MaxMetaspaceSize\=4096m -XX\:+HeapDumpOnOutOfMemoryError -Dfile.encoding\=UTF-8
18 | org.gradle.caching=true
19 | kotlin.incremental=true
20 | android.useAndroidX=true
21 | android.nonTransitiveRClass=false
22 | android.nonFinalResIds=false
23 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/sbgapps/scoreit/app/model/Header.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.app.model
18 |
19 | import com.sbgapps.scoreit.data.model.Player
20 |
21 | data class Header(
22 | val players: List,
23 | val scores: List,
24 | val markers: List
25 | )
26 |
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/GameType.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | import com.squareup.moshi.JsonClass
20 |
21 | @JsonClass(generateAdapter = false)
22 | enum class GameType {
23 | UNIVERSAL,
24 | TAROT,
25 | BELOTE,
26 | COINCHE
27 | }
28 |
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/TarotOudlerValue.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | import com.squareup.moshi.JsonClass
20 |
21 | @JsonClass(generateAdapter = false)
22 | enum class TarotOudlerValue {
23 | PETIT,
24 | EXCUSE,
25 | TWENTY_ONE
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/color/csl_secondary_enabled.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/TarotBonus.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | import com.squareup.moshi.JsonClass
20 |
21 | @JsonClass(generateAdapter = true)
22 | data class TarotBonus(
23 | val player: PlayerPosition,
24 | val bonus: TarotBonusValue
25 | )
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_chart.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
23 |
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/BeloteBonus.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | import com.squareup.moshi.JsonClass
20 |
21 | @JsonClass(generateAdapter = true)
22 | data class BeloteBonus(
23 | val player: PlayerPosition,
24 | val bonus: BeloteBonusValue
25 | )
26 |
--------------------------------------------------------------------------------
/core/src/main/res/values-v29/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 | - @string/settings_light_mode
21 | - @string/settings_dark_mode
22 | - @string/settings_system_mode
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_circle_color.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
20 |
21 |
22 |
23 |
27 |
--------------------------------------------------------------------------------
/core/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
--------------------------------------------------------------------------------
/core/src/main/res/anim/layout_animation_fall_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/core/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/data/src/main/kotlin/com/sbgapps/scoreit/data/model/ScoreBoard.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.data.model
18 |
19 | import com.squareup.moshi.JsonClass
20 |
21 | @JsonClass(generateAdapter = true)
22 | data class ScoreBoard(
23 | val scoreOne: Int = 0,
24 | val nameOne: String,
25 | val scoreTwo: Int = 0,
26 | val nameTwo: String
27 | )
28 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/widget/BaseViewHolder.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.widget
18 |
19 | import android.content.Context
20 | import android.view.View
21 | import androidx.recyclerview.widget.RecyclerView
22 |
23 | class BaseViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
24 | val context: Context get() = itemView.context
25 | }
26 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/ext/LifecycleOwner.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.ext
18 |
19 | import androidx.lifecycle.LifecycleOwner
20 | import androidx.lifecycle.LiveData
21 | import androidx.lifecycle.Observer
22 |
23 | fun > LifecycleOwner.observe(liveData: L, body: (T?) -> Unit) {
24 | liveData.observe(this, Observer(body))
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 |
21 |
25 |
--------------------------------------------------------------------------------
/core/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
--------------------------------------------------------------------------------
/core/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | 4dp
19 | 8dp
20 | 16dp
21 | 32dp
22 | 64dp
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_edition.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
--------------------------------------------------------------------------------
/core/src/main/kotlin/com/sbgapps/scoreit/core/ext/Menu.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Stéphane Baiget
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.sbgapps.scoreit.core.ext
18 |
19 | import android.view.Menu
20 | import android.view.MenuItem
21 |
22 | val Menu.items: List