From b6435529d98beb852c2df8def65cce4572468bcc Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Wed, 7 Dec 2022 17:55:01 +0100 Subject: Initial commit,v1.0.1 --- app/.gitignore | 1 + app/build.gradle | 50 +++ app/google-services.json | 40 ++ app/proguard-rules.pro | 21 ++ .../pai_fillo_nai/ExampleInstrumentedTest.java | 26 ++ app/src/main/AndroidManifest.xml | 33 ++ app/src/main/bg_no_no-playstore.png | Bin 0 -> 332382 bytes app/src/main/bg_o-playstore.png | Bin 0 -> 98776 bytes app/src/main/bg_offline_game-playstore.png | Bin 0 -> 134562 bytes app/src/main/bg_x-playstore.png | Bin 0 -> 82407 bytes app/src/main/bg_you_in_army-playstore.png | Bin 0 -> 590715 bytes app/src/main/emptiness-playstore.png | Bin 0 -> 279580 bytes .../java/com/jopek/pai_fillo_nai/MainActivity.java | 38 ++ .../jopek/pai_fillo_nai/OfflineGameActivity.java | 163 +++++++++ .../jopek/pai_fillo_nai/OnlineGameActivity.java | 348 ++++++++++++++++++ app/src/main/res/drawable-v24/bg_rounded_grey.xml | 5 + .../res/drawable-v24/ic_launcher_foreground.xml | 30 ++ app/src/main/res/drawable/bg_no_no_background.xml | 74 ++++ app/src/main/res/drawable/bg_o_background.xml | 74 ++++ .../res/drawable/bg_offline_game_background.xml | 74 ++++ app/src/main/res/drawable/bg_rounded_blue.xml | 5 + app/src/main/res/drawable/bg_rounded_rectangle.xml | 6 + app/src/main/res/drawable/bg_x_background.xml | 74 ++++ .../res/drawable/bg_you_in_army_background.xml | 74 ++++ app/src/main/res/drawable/emptiness_background.xml | 74 ++++ .../main/res/drawable/ic_baseline_gamepad_24.xml | 5 + .../main/res/drawable/ic_launcher_background.xml | 170 +++++++++ .../main/res/layout-land/activity_offline_game.xml | 233 ++++++++++++ app/src/main/res/layout/activity_main.xml | 54 +++ app/src/main/res/layout/activity_offline_game.xml | 403 +++++++++++++++++++++ app/src/main/res/layout/activity_online_game.xml | 133 +++++++ app/src/main/res/mipmap-anydpi-v26/bg_no_no.xml | 5 + .../main/res/mipmap-anydpi-v26/bg_no_no_round.xml | 5 + app/src/main/res/mipmap-anydpi-v26/bg_o.xml | 5 + app/src/main/res/mipmap-anydpi-v26/bg_o_round.xml | 5 + .../main/res/mipmap-anydpi-v26/bg_offline_game.xml | 5 + .../mipmap-anydpi-v26/bg_offline_game_round.xml | 5 + app/src/main/res/mipmap-anydpi-v26/bg_x.xml | 5 + app/src/main/res/mipmap-anydpi-v26/bg_x_round.xml | 5 + .../main/res/mipmap-anydpi-v26/bg_you_in_army.xml | 5 + .../res/mipmap-anydpi-v26/bg_you_in_army_round.xml | 5 + app/src/main/res/mipmap-anydpi-v26/emptiness.xml | 5 + .../main/res/mipmap-anydpi-v26/emptiness_round.xml | 5 + app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 + app/src/main/res/mipmap-anydpi-v26/main_bg.xml | 4 + .../main/res/mipmap-anydpi-v26/main_bg_round.xml | 4 + app/src/main/res/mipmap-hdpi/bg_no_no.png | Bin 0 -> 7825 bytes .../main/res/mipmap-hdpi/bg_no_no_foreground.png | Bin 0 -> 40080 bytes app/src/main/res/mipmap-hdpi/bg_no_no_round.png | Bin 0 -> 9206 bytes app/src/main/res/mipmap-hdpi/bg_o.png | Bin 0 -> 3942 bytes app/src/main/res/mipmap-hdpi/bg_o_foreground.png | Bin 0 -> 16579 bytes app/src/main/res/mipmap-hdpi/bg_o_round.png | Bin 0 -> 5653 bytes app/src/main/res/mipmap-hdpi/bg_offline_game.png | Bin 0 -> 8439 bytes .../res/mipmap-hdpi/bg_offline_game_foreground.png | Bin 0 -> 44721 bytes .../main/res/mipmap-hdpi/bg_offline_game_round.png | Bin 0 -> 10256 bytes app/src/main/res/mipmap-hdpi/bg_x.png | Bin 0 -> 3871 bytes app/src/main/res/mipmap-hdpi/bg_x_foreground.png | Bin 0 -> 15630 bytes app/src/main/res/mipmap-hdpi/bg_x_round.png | Bin 0 -> 5771 bytes app/src/main/res/mipmap-hdpi/bg_you_in_army.png | Bin 0 -> 10392 bytes .../res/mipmap-hdpi/bg_you_in_army_foreground.png | Bin 0 -> 56160 bytes .../main/res/mipmap-hdpi/bg_you_in_army_round.png | Bin 0 -> 12256 bytes app/src/main/res/mipmap-hdpi/emptiness.png | Bin 0 -> 6217 bytes .../main/res/mipmap-hdpi/emptiness_foreground.png | Bin 0 -> 37545 bytes app/src/main/res/mipmap-hdpi/emptiness_round.png | Bin 0 -> 7200 bytes app/src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../main/res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes app/src/main/res/mipmap-hdpi/main_bg.png | Bin 0 -> 8515 bytes .../main/res/mipmap-hdpi/main_bg_foreground.png | Bin 0 -> 47212 bytes app/src/main/res/mipmap-hdpi/main_bg_round.png | Bin 0 -> 9860 bytes app/src/main/res/mipmap-mdpi/bg_no_no.png | Bin 0 -> 4295 bytes .../main/res/mipmap-mdpi/bg_no_no_foreground.png | Bin 0 -> 20023 bytes app/src/main/res/mipmap-mdpi/bg_no_no_round.png | Bin 0 -> 4678 bytes app/src/main/res/mipmap-mdpi/bg_o.png | Bin 0 -> 1796 bytes app/src/main/res/mipmap-mdpi/bg_o_foreground.png | Bin 0 -> 8802 bytes app/src/main/res/mipmap-mdpi/bg_o_round.png | Bin 0 -> 2546 bytes app/src/main/res/mipmap-mdpi/bg_offline_game.png | Bin 0 -> 4411 bytes .../res/mipmap-mdpi/bg_offline_game_foreground.png | Bin 0 -> 23445 bytes .../main/res/mipmap-mdpi/bg_offline_game_round.png | Bin 0 -> 5118 bytes app/src/main/res/mipmap-mdpi/bg_x.png | Bin 0 -> 2523 bytes app/src/main/res/mipmap-mdpi/bg_x_foreground.png | Bin 0 -> 7697 bytes app/src/main/res/mipmap-mdpi/bg_x_round.png | Bin 0 -> 3075 bytes app/src/main/res/mipmap-mdpi/bg_you_in_army.png | Bin 0 -> 5300 bytes .../res/mipmap-mdpi/bg_you_in_army_foreground.png | Bin 0 -> 26267 bytes .../main/res/mipmap-mdpi/bg_you_in_army_round.png | Bin 0 -> 5955 bytes app/src/main/res/mipmap-mdpi/emptiness.png | Bin 0 -> 3485 bytes .../main/res/mipmap-mdpi/emptiness_foreground.png | Bin 0 -> 17375 bytes app/src/main/res/mipmap-mdpi/emptiness_round.png | Bin 0 -> 3753 bytes app/src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../main/res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes app/src/main/res/mipmap-mdpi/main_bg.png | Bin 0 -> 4549 bytes .../main/res/mipmap-mdpi/main_bg_foreground.png | Bin 0 -> 24619 bytes app/src/main/res/mipmap-mdpi/main_bg_round.png | Bin 0 -> 5134 bytes app/src/main/res/mipmap-xhdpi/bg_no_no.png | Bin 0 -> 13156 bytes .../main/res/mipmap-xhdpi/bg_no_no_foreground.png | Bin 0 -> 65831 bytes app/src/main/res/mipmap-xhdpi/bg_no_no_round.png | Bin 0 -> 15108 bytes app/src/main/res/mipmap-xhdpi/bg_o.png | Bin 0 -> 6684 bytes app/src/main/res/mipmap-xhdpi/bg_o_foreground.png | Bin 0 -> 25436 bytes app/src/main/res/mipmap-xhdpi/bg_o_round.png | Bin 0 -> 9129 bytes app/src/main/res/mipmap-xhdpi/bg_offline_game.png | Bin 0 -> 14050 bytes .../mipmap-xhdpi/bg_offline_game_foreground.png | Bin 0 -> 66965 bytes .../res/mipmap-xhdpi/bg_offline_game_round.png | Bin 0 -> 16605 bytes app/src/main/res/mipmap-xhdpi/bg_x.png | Bin 0 -> 6823 bytes app/src/main/res/mipmap-xhdpi/bg_x_foreground.png | Bin 0 -> 23422 bytes app/src/main/res/mipmap-xhdpi/bg_x_round.png | Bin 0 -> 8385 bytes app/src/main/res/mipmap-xhdpi/bg_you_in_army.png | Bin 0 -> 17894 bytes .../res/mipmap-xhdpi/bg_you_in_army_foreground.png | Bin 0 -> 95257 bytes .../main/res/mipmap-xhdpi/bg_you_in_army_round.png | Bin 0 -> 20761 bytes app/src/main/res/mipmap-xhdpi/emptiness.png | Bin 0 -> 10334 bytes .../main/res/mipmap-xhdpi/emptiness_foreground.png | Bin 0 -> 64899 bytes app/src/main/res/mipmap-xhdpi/emptiness_round.png | Bin 0 -> 11655 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes app/src/main/res/mipmap-xhdpi/main_bg.png | Bin 0 -> 13805 bytes .../main/res/mipmap-xhdpi/main_bg_foreground.png | Bin 0 -> 73354 bytes app/src/main/res/mipmap-xhdpi/main_bg_round.png | Bin 0 -> 15571 bytes app/src/main/res/mipmap-xxhdpi/bg_no_no.png | Bin 0 -> 26421 bytes .../main/res/mipmap-xxhdpi/bg_no_no_foreground.png | Bin 0 -> 132646 bytes app/src/main/res/mipmap-xxhdpi/bg_no_no_round.png | Bin 0 -> 30185 bytes app/src/main/res/mipmap-xxhdpi/bg_o.png | Bin 0 -> 12657 bytes app/src/main/res/mipmap-xxhdpi/bg_o_foreground.png | Bin 0 -> 46135 bytes app/src/main/res/mipmap-xxhdpi/bg_o_round.png | Bin 0 -> 16731 bytes app/src/main/res/mipmap-xxhdpi/bg_offline_game.png | Bin 0 -> 26755 bytes .../mipmap-xxhdpi/bg_offline_game_foreground.png | Bin 0 -> 105409 bytes .../res/mipmap-xxhdpi/bg_offline_game_round.png | Bin 0 -> 30554 bytes app/src/main/res/mipmap-xxhdpi/bg_x.png | Bin 0 -> 10964 bytes app/src/main/res/mipmap-xxhdpi/bg_x_foreground.png | Bin 0 -> 44410 bytes app/src/main/res/mipmap-xxhdpi/bg_x_round.png | Bin 0 -> 14520 bytes app/src/main/res/mipmap-xxhdpi/bg_you_in_army.png | Bin 0 -> 37061 bytes .../mipmap-xxhdpi/bg_you_in_army_foreground.png | Bin 0 -> 200436 bytes .../res/mipmap-xxhdpi/bg_you_in_army_round.png | Bin 0 -> 43163 bytes app/src/main/res/mipmap-xxhdpi/emptiness.png | Bin 0 -> 20748 bytes .../res/mipmap-xxhdpi/emptiness_foreground.png | Bin 0 -> 141419 bytes app/src/main/res/mipmap-xxhdpi/emptiness_round.png | Bin 0 -> 23306 bytes app/src/main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes app/src/main/res/mipmap-xxhdpi/main_bg.png | Bin 0 -> 25322 bytes .../main/res/mipmap-xxhdpi/main_bg_foreground.png | Bin 0 -> 139061 bytes app/src/main/res/mipmap-xxhdpi/main_bg_round.png | Bin 0 -> 28758 bytes app/src/main/res/mipmap-xxxhdpi/bg_no_no.png | Bin 0 -> 43280 bytes .../res/mipmap-xxxhdpi/bg_no_no_foreground.png | Bin 0 -> 214325 bytes app/src/main/res/mipmap-xxxhdpi/bg_no_no_round.png | Bin 0 -> 49493 bytes app/src/main/res/mipmap-xxxhdpi/bg_o.png | Bin 0 -> 19181 bytes .../main/res/mipmap-xxxhdpi/bg_o_foreground.png | Bin 0 -> 70433 bytes app/src/main/res/mipmap-xxxhdpi/bg_o_round.png | Bin 0 -> 24922 bytes .../main/res/mipmap-xxxhdpi/bg_offline_game.png | Bin 0 -> 40179 bytes .../mipmap-xxxhdpi/bg_offline_game_foreground.png | Bin 0 -> 139522 bytes .../res/mipmap-xxxhdpi/bg_offline_game_round.png | Bin 0 -> 44819 bytes app/src/main/res/mipmap-xxxhdpi/bg_x.png | Bin 0 -> 16282 bytes .../main/res/mipmap-xxxhdpi/bg_x_foreground.png | Bin 0 -> 68985 bytes app/src/main/res/mipmap-xxxhdpi/bg_x_round.png | Bin 0 -> 21673 bytes app/src/main/res/mipmap-xxxhdpi/bg_you_in_army.png | Bin 0 -> 63342 bytes .../mipmap-xxxhdpi/bg_you_in_army_foreground.png | Bin 0 -> 336578 bytes .../res/mipmap-xxxhdpi/bg_you_in_army_round.png | Bin 0 -> 73397 bytes app/src/main/res/mipmap-xxxhdpi/emptiness.png | Bin 0 -> 34554 bytes .../res/mipmap-xxxhdpi/emptiness_foreground.png | Bin 0 -> 244241 bytes .../main/res/mipmap-xxxhdpi/emptiness_round.png | Bin 0 -> 38888 bytes app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes app/src/main/res/mipmap-xxxhdpi/main_bg.png | Bin 0 -> 40418 bytes .../main/res/mipmap-xxxhdpi/main_bg_foreground.png | Bin 0 -> 208886 bytes app/src/main/res/mipmap-xxxhdpi/main_bg_round.png | Bin 0 -> 45566 bytes app/src/main/res/values-night/themes.xml | 16 + app/src/main/res/values/colors.xml | 10 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/themes.xml | 16 + app/src/main/res/xml/backup_rules.xml | 13 + app/src/main/res/xml/data_extraction_rules.xml | 19 + .../com/jopek/pai_fillo_nai/ExampleUnitTest.java | 17 + 169 files changed, 2380 insertions(+) create mode 100644 app/.gitignore create mode 100644 app/build.gradle create mode 100644 app/google-services.json create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/com/jopek/pai_fillo_nai/ExampleInstrumentedTest.java create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/bg_no_no-playstore.png create mode 100644 app/src/main/bg_o-playstore.png create mode 100644 app/src/main/bg_offline_game-playstore.png create mode 100644 app/src/main/bg_x-playstore.png create mode 100644 app/src/main/bg_you_in_army-playstore.png create mode 100644 app/src/main/emptiness-playstore.png create mode 100644 app/src/main/java/com/jopek/pai_fillo_nai/MainActivity.java create mode 100644 app/src/main/java/com/jopek/pai_fillo_nai/OfflineGameActivity.java create mode 100644 app/src/main/java/com/jopek/pai_fillo_nai/OnlineGameActivity.java create mode 100644 app/src/main/res/drawable-v24/bg_rounded_grey.xml create mode 100644 app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 app/src/main/res/drawable/bg_no_no_background.xml create mode 100644 app/src/main/res/drawable/bg_o_background.xml create mode 100644 app/src/main/res/drawable/bg_offline_game_background.xml create mode 100644 app/src/main/res/drawable/bg_rounded_blue.xml create mode 100644 app/src/main/res/drawable/bg_rounded_rectangle.xml create mode 100644 app/src/main/res/drawable/bg_x_background.xml create mode 100644 app/src/main/res/drawable/bg_you_in_army_background.xml create mode 100644 app/src/main/res/drawable/emptiness_background.xml create mode 100644 app/src/main/res/drawable/ic_baseline_gamepad_24.xml create mode 100644 app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 app/src/main/res/layout-land/activity_offline_game.xml create mode 100644 app/src/main/res/layout/activity_main.xml create mode 100644 app/src/main/res/layout/activity_offline_game.xml create mode 100644 app/src/main/res/layout/activity_online_game.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_no_no.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_no_no_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_o.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_o_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_offline_game.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_offline_game_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_x.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_x_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_you_in_army.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/bg_you_in_army_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/emptiness.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/emptiness_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/main_bg.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/main_bg_round.xml create mode 100644 app/src/main/res/mipmap-hdpi/bg_no_no.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_no_no_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_no_no_round.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_o.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_o_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_o_round.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_offline_game.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_offline_game_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_offline_game_round.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_x.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_x_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_x_round.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_you_in_army.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_you_in_army_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/bg_you_in_army_round.png create mode 100644 app/src/main/res/mipmap-hdpi/emptiness.png create mode 100644 app/src/main/res/mipmap-hdpi/emptiness_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/emptiness_round.png create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-hdpi/main_bg.png create mode 100644 app/src/main/res/mipmap-hdpi/main_bg_foreground.png create mode 100644 app/src/main/res/mipmap-hdpi/main_bg_round.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_no_no.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_no_no_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_no_no_round.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_o.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_o_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_o_round.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_offline_game.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_offline_game_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_offline_game_round.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_x.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_x_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_x_round.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_you_in_army.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_you_in_army_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/bg_you_in_army_round.png create mode 100644 app/src/main/res/mipmap-mdpi/emptiness.png create mode 100644 app/src/main/res/mipmap-mdpi/emptiness_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/emptiness_round.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-mdpi/main_bg.png create mode 100644 app/src/main/res/mipmap-mdpi/main_bg_foreground.png create mode 100644 app/src/main/res/mipmap-mdpi/main_bg_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_no_no.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_no_no_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_no_no_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_o.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_o_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_o_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_offline_game.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_offline_game_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_offline_game_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_x.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_x_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_x_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_you_in_army.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_you_in_army_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/bg_you_in_army_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/emptiness.png create mode 100644 app/src/main/res/mipmap-xhdpi/emptiness_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/emptiness_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xhdpi/main_bg.png create mode 100644 app/src/main/res/mipmap-xhdpi/main_bg_foreground.png create mode 100644 app/src/main/res/mipmap-xhdpi/main_bg_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_no_no.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_no_no_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_no_no_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_o.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_o_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_o_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_offline_game.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_offline_game_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_offline_game_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_x.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_x_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_x_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_you_in_army.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_you_in_army_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/bg_you_in_army_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/emptiness.png create mode 100644 app/src/main/res/mipmap-xxhdpi/emptiness_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/emptiness_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/main_bg.png create mode 100644 app/src/main/res/mipmap-xxhdpi/main_bg_foreground.png create mode 100644 app/src/main/res/mipmap-xxhdpi/main_bg_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_no_no.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_no_no_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_no_no_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_o.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_o_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_o_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_offline_game.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_offline_game_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_offline_game_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_x.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_x_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_x_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_you_in_army.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/emptiness.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/emptiness_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/emptiness_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/main_bg.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/main_bg_foreground.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/main_bg_round.png create mode 100644 app/src/main/res/values-night/themes.xml create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/themes.xml create mode 100644 app/src/main/res/xml/backup_rules.xml create mode 100644 app/src/main/res/xml/data_extraction_rules.xml create mode 100644 app/src/test/java/com/jopek/pai_fillo_nai/ExampleUnitTest.java (limited to 'app') diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..78c44e7 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,50 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdk 32 + + defaultConfig { + applicationId "com.jopek.pai_fillo_nai" + minSdk 23 + targetSdk 32 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + debug { + applicationIdSuffix ".debug" + debuggable true + } + staging { + initWith debug + manifestPlaceholders = [hostName:"internal.example.com"] + applicationIdSuffix ".debugStaging" + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'com.google.android.material:material:1.6.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.firebase:firebase-database:19.2.1' + implementation 'com.google.firebase:firebase-database' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..3879a23 --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,40 @@ +{ + "project_info": { + "project_number": "689674668259", + "project_id": "pai-fillo-nai", + "storage_bucket": "pai-fillo-nai.appspot.com", + "firebase_url": "https://pai-fillo-nai-default-rtdb.europe-west1.firebasedatabase.app/" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:689674668259:android:9266a25c110840cd3b1dd6", + "android_client_info": { + "package_name": "com.jopek.pai_fillo_nai.debug" + } + }, + "oauth_client": [ + { + "client_id": "689674668259-k337s6qqt2qkbtkifan7epe9mg56krqu.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyBj-bcz6LnUK0cfnSFZ8ySKbg404qjY_7M" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "689674668259-k337s6qqt2qkbtkifan7epe9mg56krqu.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/androidTest/java/com/jopek/pai_fillo_nai/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/jopek/pai_fillo_nai/ExampleInstrumentedTest.java new file mode 100644 index 0000000..09cbe31 --- /dev/null +++ b/app/src/androidTest/java/com/jopek/pai_fillo_nai/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.jopek.pai_fillo_nai; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.jopek.pai_fillo_nai", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7d4e1a0 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/bg_no_no-playstore.png b/app/src/main/bg_no_no-playstore.png new file mode 100644 index 0000000..2d09745 Binary files /dev/null and b/app/src/main/bg_no_no-playstore.png differ diff --git a/app/src/main/bg_o-playstore.png b/app/src/main/bg_o-playstore.png new file mode 100644 index 0000000..1e0128f Binary files /dev/null and b/app/src/main/bg_o-playstore.png differ diff --git a/app/src/main/bg_offline_game-playstore.png b/app/src/main/bg_offline_game-playstore.png new file mode 100644 index 0000000..4ae0615 Binary files /dev/null and b/app/src/main/bg_offline_game-playstore.png differ diff --git a/app/src/main/bg_x-playstore.png b/app/src/main/bg_x-playstore.png new file mode 100644 index 0000000..b4edfd6 Binary files /dev/null and b/app/src/main/bg_x-playstore.png differ diff --git a/app/src/main/bg_you_in_army-playstore.png b/app/src/main/bg_you_in_army-playstore.png new file mode 100644 index 0000000..654c36d Binary files /dev/null and b/app/src/main/bg_you_in_army-playstore.png differ diff --git a/app/src/main/emptiness-playstore.png b/app/src/main/emptiness-playstore.png new file mode 100644 index 0000000..b37fe64 Binary files /dev/null and b/app/src/main/emptiness-playstore.png differ diff --git a/app/src/main/java/com/jopek/pai_fillo_nai/MainActivity.java b/app/src/main/java/com/jopek/pai_fillo_nai/MainActivity.java new file mode 100644 index 0000000..99ea7b4 --- /dev/null +++ b/app/src/main/java/com/jopek/pai_fillo_nai/MainActivity.java @@ -0,0 +1,38 @@ +package com.jopek.pai_fillo_nai; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.WindowManager; +import android.widget.TextView; +import android.widget.Toast; + +import com.google.firebase.database.DataSnapshot; +import com.google.firebase.database.DatabaseError; +import com.google.firebase.database.DatabaseReference; +import com.google.firebase.database.FirebaseDatabase; +import com.google.firebase.database.ValueEventListener; + +public class MainActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + getSupportActionBar().hide(); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); + + setContentView(R.layout.activity_main); + TextView txtvOffline = findViewById(R.id.txtvOffline); + txtvOffline.setOnClickListener(view -> { + Intent intent = new Intent(MainActivity.this, OfflineGameActivity.class); + startActivity(intent); + }); + TextView txtvOnline = findViewById(R.id.txtvOnline); + txtvOnline.setOnClickListener(view -> { + Intent intent = new Intent(MainActivity.this, OnlineGameActivity.class); + startActivity(intent); + }); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/jopek/pai_fillo_nai/OfflineGameActivity.java b/app/src/main/java/com/jopek/pai_fillo_nai/OfflineGameActivity.java new file mode 100644 index 0000000..2b1d918 --- /dev/null +++ b/app/src/main/java/com/jopek/pai_fillo_nai/OfflineGameActivity.java @@ -0,0 +1,163 @@ +package com.jopek.pai_fillo_nai; + +import android.app.AlertDialog; +import android.content.Intent; +import android.os.Build; +import android.os.Bundle; +import android.os.PersistableBundle; +import android.util.Log; +import android.view.WindowManager; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; +import androidx.appcompat.app.AppCompatActivity; + +import java.util.concurrent.ThreadLocalRandom; + +public class OfflineGameActivity extends AppCompatActivity { + // 0player - O, 1player - X + int whoseTurn = ThreadLocalRandom.current().nextInt(0, 1 + 1); + int[] gameBoard = new int[]{-1, -1, -1, -1, -1, -1, -1, -1, -1}; + + ImageView p0Img; + ImageView p1Img; + + TextView square0, square1, square2, square3, square4, square5, square6, square7, square8; + + final String TAG = "maks"; + + @RequiresApi(api = Build.VERSION_CODES.N) + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + getSupportActionBar().hide(); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); + setContentView(R.layout.activity_offline_game); + + square0 = findViewById(R.id.square0); + square1 = findViewById(R.id.square1); + square2 = findViewById(R.id.square2); + square3 = findViewById(R.id.square3); + square4 = findViewById(R.id.square4); + square5 = findViewById(R.id.square5); + square6 = findViewById(R.id.square6); + square7 = findViewById(R.id.square7); + square8 = findViewById(R.id.square8); + + Log.d(TAG, "onCreate: "+ savedInstanceState); + if(savedInstanceState != null) { + int[] maybeGameBoard = savedInstanceState.getIntArray("gameBoard"); + int maybeWhoseTurn = savedInstanceState.getInt("whoseTurn"); + if(maybeGameBoard != null) { + gameBoard = maybeGameBoard; + whoseTurn = maybeWhoseTurn; + } + Log.d(TAG, "onCreate: "+ gameBoard); + Log.d(TAG, "onCreate: "+ whoseTurn); + } + + p0Img = findViewById(R.id.p0Img); + p1Img = findViewById(R.id.p1Img); + if (whoseTurn == 0) { + p0Img.setImageResource(R.mipmap.bg_you_in_army_foreground); + p1Img.setImageResource(R.mipmap.bg_no_no_foreground); + } else { + p0Img.setImageResource(R.mipmap.bg_no_no_foreground); + p1Img.setImageResource(R.mipmap.bg_you_in_army_foreground); + } + + + int i = 0; + for (TextView square : + new TextView[]{square0, square1, square2, square3, square4, square5, square6, square7, square8}) { + int finalI = i; + square.setOnClickListener(view -> onSquareClick((TextView) view, finalI)); + if(gameBoard[i] == -1) + square.setText(""); + else + square.setText(gameBoard[i] == 0 ? "O" : "X"); + i++; + } + } + + @Override + protected void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + outState.putIntArray("gameBoard", gameBoard); + outState.putInt("whoseTurn", whoseTurn); + } + + @RequiresApi(api = Build.VERSION_CODES.N) + protected void onSquareClick(TextView square, int id) { + if (gameBoard[id] != -1) return; + gameBoard[id] = whoseTurn; + square.setText(whoseTurn == 0 ? "O" : "X"); + if (checkWon()) { + endGame(whoseTurn); + return; + } else if (checkDraw()) { + endGame(-1); + return; + } + whoseTurn = whoseTurn == 0 ? 1 : 0; + if (whoseTurn == 0) { + p0Img.setImageResource(R.mipmap.bg_you_in_army_foreground); + p1Img.setImageResource(R.mipmap.bg_no_no_foreground); + } else { + p0Img.setImageResource(R.mipmap.bg_no_no_foreground); + p1Img.setImageResource(R.mipmap.bg_you_in_army_foreground); + } + } + + protected boolean checkWon() { + return chkTriEqOnGB(0, 1, 2) || chkTriEqOnGB(3, 4, 5) || chkTriEqOnGB(6, 7, 8) || + chkTriEqOnGB(0, 3, 6) || chkTriEqOnGB(1, 4, 7) || chkTriEqOnGB(2, 5, 8) || + chkTriEqOnGB(0, 4, 8) || chkTriEqOnGB(2, 4, 6); + } + + @RequiresApi(api = Build.VERSION_CODES.N) + protected boolean checkDraw() { + return gameBoard[0] != -1 && + gameBoard[1] != -1 && + gameBoard[2] != -1 && + gameBoard[3] != -1 && + gameBoard[4] != -1 && + gameBoard[5] != -1 && + gameBoard[6] != -1 && + gameBoard[7] != -1 && + gameBoard[8] != -1; + } + + protected void endGame(int whoWon) { + new AlertDialog.Builder(this) + .setTitle(whoWon == -1 ? "DRAW" : "Player " + (whoWon + 1) + " WON") + .setMessage(whoWon == -1 ? "Maybe next time" : "Congratulations to Player " + (whoWon + 1)) + .setCancelable(false) + .setPositiveButton("Play again", (dialog, which) -> { + gameBoard = new int[]{-1, -1, -1, -1, -1, -1, -1, -1, -1}; + square0.setText(""); + square1.setText(""); + square2.setText(""); + square3.setText(""); + square4.setText(""); + square5.setText(""); + square6.setText(""); + square7.setText(""); + square8.setText(""); + whoseTurn = ThreadLocalRandom.current().nextInt(0, 1 + 1); + }) + .setNegativeButton("Go to menu", (dialog, which) -> { + Intent intent = new Intent(OfflineGameActivity.this, MainActivity.class); + startActivity(intent); + }) + .setIcon(android.R.drawable.ic_dialog_alert) + .show(); + } + + // CheckTripleEqualityOnGameBoard + protected boolean chkTriEqOnGB(int a, int b, int c) { + return gameBoard[a] == gameBoard[b] && gameBoard[b] == gameBoard[c] && gameBoard[a] != -1; + } +} \ No newline at end of file diff --git a/app/src/main/java/com/jopek/pai_fillo_nai/OnlineGameActivity.java b/app/src/main/java/com/jopek/pai_fillo_nai/OnlineGameActivity.java new file mode 100644 index 0000000..d389833 --- /dev/null +++ b/app/src/main/java/com/jopek/pai_fillo_nai/OnlineGameActivity.java @@ -0,0 +1,348 @@ +package com.jopek.pai_fillo_nai; + +import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.content.Intent; +import android.os.Build; +import android.os.Bundle; +import android.text.InputType; +import android.util.Log; +import android.view.WindowManager; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.RequiresApi; +import androidx.appcompat.app.AppCompatActivity; + +import com.google.firebase.database.DataSnapshot; +import com.google.firebase.database.DatabaseError; +import com.google.firebase.database.DatabaseReference; +import com.google.firebase.database.FirebaseDatabase; +import com.google.firebase.database.ValueEventListener; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; + +public class OnlineGameActivity extends AppCompatActivity { + protected boolean gameWasEnd = false; + // 0player - O, 1player - X + long whoseTurn = ThreadLocalRandom.current().nextInt(0, 1 + 1); + List gameBoard = new ArrayList<>( + Arrays.asList(-1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L) + ); + List squares = new ArrayList<>(); + DatabaseReference rooms; + DatabaseReference room; + // FinishGameAlert + AlertDialog fgAlert = null; + long whoami = 0; + boolean myTurn = false; + boolean revengePossible = true; + boolean revengeRequested = false; + String TAG = "maks"; + ImageView p0Img; + ImageView p1Img; + ImageView square0, square1, square2, square3, square4, square5, square6, square7, square8; + TextView tvName; + + @RequiresApi(api = Build.VERSION_CODES.N) + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + getSupportActionBar().hide(); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); + setContentView(R.layout.activity_online_game); + + p0Img = findViewById(R.id.p0Img); + p1Img = findViewById(R.id.p1Img); + tvName = findViewById(R.id.onPlayerName); + + square0 = findViewById(R.id.square0); + square1 = findViewById(R.id.square1); + square2 = findViewById(R.id.square2); + square3 = findViewById(R.id.square3); + square4 = findViewById(R.id.square4); + square5 = findViewById(R.id.square5); + square6 = findViewById(R.id.square6); + square7 = findViewById(R.id.square7); + square8 = findViewById(R.id.square8); + squares.addAll(Arrays.asList(square0, square1, square2, square3, square4, square5, square6, square7, square8)); + int i = 0; + for (ImageView square : squares) { + int finalI = i; + square.setOnClickListener(view -> onSquareClick((ImageView) view, finalI)); + i++; + } + rooms = FirebaseDatabase.getInstance("https://pai-fillo-nai-default-rtdb.europe-west1.firebasedatabase.app/").getReference("rooms"); + + askForRoomId(false); + } + + @RequiresApi(api = Build.VERSION_CODES.N) + protected void askForRoomId(boolean errorOccured) { + final EditText input = new EditText(this); + input.setInputType(InputType.TYPE_CLASS_NUMBER); + + new AlertDialog.Builder(this) + .setTitle(errorOccured ? "Error occured, choose room again" : "Choose room") + .setMessage("(blank to create new)") + .setCancelable(false) + .setView(input) + .setPositiveButton("Join room", (dialog, which) -> { + getRoom(String.valueOf(input.getText())); + }) + .setIcon(R.drawable.ic_baseline_gamepad_24) + .show(); + } + + @RequiresApi(api = Build.VERSION_CODES.N) + @SuppressLint("DefaultLocale") + protected void getRoom(String roomId) { + if (roomId.equals("")) { + Random rand = new Random(); + + int n = new Random().nextInt(900000) + 100000; + + String rid = String.valueOf(n); + whoami = rand.nextInt(2); + tvName.setText("You're player 1 (playing as " + (whoami == 0 ? "O" : "X") + ")"); + + room = rooms.child(rid); + Map data = new HashMap<>(); + data.put("started", 0); + data.put("player1", whoami); + data.put("player2", whoami == 0 ? 1 : 0); + data.put("whoseTurn", rand.nextInt(2)); + data.put("board", gameBoard); + data.put("winner", -1); + data.put("revenge0", -1); + data.put("revenge1", -1); + room.setValue(data); + + waitFor2Player(rid); + } else { + rooms.child(roomId).addListenerForSingleValueEvent(new ValueEventListener() { + @Override + public void onDataChange(DataSnapshot dataSnapshot) { + if (!(dataSnapshot.getValue() instanceof HashMap)) { + askForRoomId(true); + } + HashMap data = (HashMap) dataSnapshot.getValue(); + if ((long) data.get("started") == 1) { + askForRoomId(true); + } + whoami = (long) data.get("player2"); + whoseTurn = (long) data.get("whoseTurn"); + tvName.setText("You're player 1 (playing as " + (whoami == 0 ? "O" : "X") + ")"); + room = rooms.child(roomId); + startGame(true); + } + + @Override + public void onCancelled(DatabaseError databaseError) { + askForRoomId(true); + } + }); + } + } + + protected void waitFor2Player(String roomId) { + AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this) + .setTitle("Waiting for 2nd player") + .setMessage("Your room id = " + roomId) + .setCancelable(false) + .setIcon(R.drawable.ic_baseline_gamepad_24); + AlertDialog alert = alertBuilder.create(); + alert.show(); + alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); + + room.addValueEventListener(new ValueEventListener() { + @Override + public void onDataChange(DataSnapshot dataSnapshot) { + HashMap data = (HashMap) dataSnapshot.getValue(); + if ((long) data.get("started") == 1) { + room.removeEventListener(this); + alert.dismiss(); + startGame(false); + } + } + + @Override + public void onCancelled(DatabaseError databaseError) { + Log.d(TAG, "onCancelled: Waiter Value Event Listener"); + } + }); + } + + protected void startGame(boolean markStarted) { + if (markStarted) { + room.child("started").setValue(1); + } + room.addValueEventListener(new ValueEventListener() { + @Override + public void onDataChange(DataSnapshot dataSnapshot) { + HashMap data = (HashMap) dataSnapshot.getValue(); + if (data == null) { + room.removeEventListener(this); + return; + } + + Log.d(TAG, "onDataChange: " + Arrays.toString(data.entrySet().toArray())); + gameBoard = (List) data.get("board"); + Log.d(TAG, "onDataChange: " + Arrays.toString(gameBoard.toArray())); + whoseTurn = (long) data.get("whoseTurn"); + myTurn = whoseTurn == whoami; + playTurn(); + long winner = (long) data.get("winner"); + long opRevenge = (long) data.get("revenge" + (whoami == 0 ? 1 : 0)); + revengePossible = opRevenge != 0; + if (revengeRequested && winner == -1) { + myTurn = whoami == (long) data.get("whoseTurn"); + revengePossible = true; + revengeRequested = false; + gameWasEnd = false; + playTurn(); + } else if (!revengePossible && revengeRequested) { + fgAlert.dismiss(); + new AlertDialog.Builder(OnlineGameActivity.this) + .setTitle("Sad info") + .setMessage("Second player don't want to play with ya :(") + .setCancelable(false) + .setNegativeButton("Go to menu without friend", (dialog, which) -> { + room.removeValue(); + Intent intent = new Intent(OnlineGameActivity.this, MainActivity.class); + startActivity(intent); + }) + .setIcon(R.drawable.ic_baseline_gamepad_24) + .show(); + } else if (opRevenge == 1 && revengeRequested) { + Map data2 = new HashMap<>(); + gameBoard = new ArrayList<>(Arrays.asList(-1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L)); + data2.put("started", 1); + data2.put("player1", whoami); + data2.put("player2", whoami == 0 ? 1L : 0L); + data2.put("whoseTurn", new Long(ThreadLocalRandom.current().nextInt(0, 1 + 1))); + data2.put("board", gameBoard); + data2.put("winner", -1L); + data2.put("revenge0", -1L); + data2.put("revenge1", -1L); + myTurn = whoami == (long) data2.get("whoseTurn"); + room.setValue(data2); + playTurn(); + } + + if (winner != -1) { + endGame(winner); + } + } + + @Override + public void onCancelled(DatabaseError databaseError) { + Log.d(TAG, "onCancelled: Main Value Event Listener"); + } + }); + } + + protected void playTurn() { + int i = 0; + for (ImageView square : squares) { + if (gameBoard.get(i) == -1) { + square.setImageResource(R.mipmap.emptiness_foreground); + } else if (gameBoard.get(i) == 0) { + square.setImageResource(R.mipmap.bg_o_foreground); + } else if (gameBoard.get(i) == 1) { + square.setImageResource(R.mipmap.bg_x_foreground); + } + i++; + } + if (myTurn) { + p0Img.setImageResource(R.mipmap.bg_you_in_army_foreground); + } else { + p0Img.setImageResource(R.mipmap.bg_no_no_foreground); + } + } + + protected void finishTurn() { + room.child("whoseTurn").setValue(whoseTurn); + room.child("board").setValue(gameBoard); + } + + @RequiresApi(api = Build.VERSION_CODES.N) + protected void onSquareClick(ImageView square, int id) { + if (gameBoard.get(id) != -1 || !myTurn) return; + gameBoard.set(id, whoseTurn); + square.setImageResource(whoseTurn == 0 ? R.mipmap.bg_o_foreground : R.mipmap.bg_x_foreground); + if (checkWon()) { + endGame(whoseTurn); + return; + } else if (checkDraw()) { + endGame(2); + return; + } + whoseTurn = whoseTurn == 0 ? 1 : 0; + if (whoseTurn == whoami) { + p0Img.setImageResource(R.mipmap.bg_you_in_army_foreground); + } else { + p0Img.setImageResource(R.mipmap.bg_no_no_foreground); + } + finishTurn(); + } + + protected boolean checkWon() { + return chkTriEqOnGB(0, 1, 2) || chkTriEqOnGB(3, 4, 5) || chkTriEqOnGB(6, 7, 8) || + chkTriEqOnGB(0, 3, 6) || chkTriEqOnGB(1, 4, 7) || chkTriEqOnGB(2, 5, 8) || + chkTriEqOnGB(0, 4, 8) || chkTriEqOnGB(2, 4, 6); + } + + @RequiresApi(api = Build.VERSION_CODES.N) + protected boolean checkDraw() { + return gameBoard.get(0) != -1 && + gameBoard.get(1) != -1 && + gameBoard.get(2) != -1 && + gameBoard.get(3) != -1 && + gameBoard.get(4) != -1 && + gameBoard.get(5) != -1 && + gameBoard.get(6) != -1 && + gameBoard.get(7) != -1 && + gameBoard.get(8) != -1; + } + + protected void endGame(long whoWon) { + if (gameWasEnd) return; + gameWasEnd = true; + + finishTurn(); + room.child("winner").setValue(whoWon); + AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this) + .setTitle(whoWon == 2 ? "DRAW" : "Player " + (whoWon + 1) + " WON") + .setMessage(whoWon == 2 ? "Maybe next time" : "Congratulations to Player " + (whoWon + 1)) + .setCancelable(false) + .setPositiveButton("Request revenge", (dialog, which) -> { + revengeRequested = true; + room.child("revenge" + whoami).setValue(1); + }) + .setNegativeButton("Go to menu", (dialog, which) -> { + room.child("revenge" + whoami).setValue(0); + if (!revengePossible) { + room.removeValue(); + } + Intent intent = new Intent(OnlineGameActivity.this, MainActivity.class); + startActivity(intent); + }) + .setIcon(R.drawable.ic_baseline_gamepad_24); + fgAlert = alertBuilder.create(); + fgAlert.show(); + } + + // CheckTripleEqualityOnGameBoard + protected boolean chkTriEqOnGB(int a, int b, int c) { + return Objects.equals(gameBoard.get(a), gameBoard.get(b)) && gameBoard.get(b).equals(gameBoard.get(c)) && gameBoard.get(a) != -1; + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable-v24/bg_rounded_grey.xml b/app/src/main/res/drawable-v24/bg_rounded_grey.xml new file mode 100644 index 0000000..b128841 --- /dev/null +++ b/app/src/main/res/drawable-v24/bg_rounded_grey.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_no_no_background.xml b/app/src/main/res/drawable/bg_no_no_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/bg_no_no_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/bg_o_background.xml b/app/src/main/res/drawable/bg_o_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/bg_o_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/bg_offline_game_background.xml b/app/src/main/res/drawable/bg_offline_game_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/bg_offline_game_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/bg_rounded_blue.xml b/app/src/main/res/drawable/bg_rounded_blue.xml new file mode 100644 index 0000000..244796f --- /dev/null +++ b/app/src/main/res/drawable/bg_rounded_blue.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable/bg_rounded_rectangle.xml b/app/src/main/res/drawable/bg_rounded_rectangle.xml new file mode 100644 index 0000000..fc07bcd --- /dev/null +++ b/app/src/main/res/drawable/bg_rounded_rectangle.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_x_background.xml b/app/src/main/res/drawable/bg_x_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/bg_x_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/bg_you_in_army_background.xml b/app/src/main/res/drawable/bg_you_in_army_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/bg_you_in_army_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/emptiness_background.xml b/app/src/main/res/drawable/emptiness_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/emptiness_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_baseline_gamepad_24.xml b/app/src/main/res/drawable/ic_baseline_gamepad_24.xml new file mode 100644 index 0000000..c1d8616 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_gamepad_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout-land/activity_offline_game.xml b/app/src/main/res/layout-land/activity_offline_game.xml new file mode 100644 index 0000000..71bb421 --- /dev/null +++ b/app/src/main/res/layout-land/activity_offline_game.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..c0b4598 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,54 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_offline_game.xml b/app/src/main/res/layout/activity_offline_game.xml new file mode 100644 index 0000000..5fbae8b --- /dev/null +++ b/app/src/main/res/layout/activity_offline_game.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_online_game.xml b/app/src/main/res/layout/activity_online_game.xml new file mode 100644 index 0000000..d9ccef3 --- /dev/null +++ b/app/src/main/res/layout/activity_online_game.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_no_no.xml b/app/src/main/res/mipmap-anydpi-v26/bg_no_no.xml new file mode 100644 index 0000000..f42b8ee --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_no_no.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_no_no_round.xml b/app/src/main/res/mipmap-anydpi-v26/bg_no_no_round.xml new file mode 100644 index 0000000..f42b8ee --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_no_no_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_o.xml b/app/src/main/res/mipmap-anydpi-v26/bg_o.xml new file mode 100644 index 0000000..fce39bd --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_o.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_o_round.xml b/app/src/main/res/mipmap-anydpi-v26/bg_o_round.xml new file mode 100644 index 0000000..fce39bd --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_o_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_offline_game.xml b/app/src/main/res/mipmap-anydpi-v26/bg_offline_game.xml new file mode 100644 index 0000000..b2ebef3 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_offline_game.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_offline_game_round.xml b/app/src/main/res/mipmap-anydpi-v26/bg_offline_game_round.xml new file mode 100644 index 0000000..b2ebef3 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_offline_game_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_x.xml b/app/src/main/res/mipmap-anydpi-v26/bg_x.xml new file mode 100644 index 0000000..4925312 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_x.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_x_round.xml b/app/src/main/res/mipmap-anydpi-v26/bg_x_round.xml new file mode 100644 index 0000000..4925312 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_x_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_you_in_army.xml b/app/src/main/res/mipmap-anydpi-v26/bg_you_in_army.xml new file mode 100644 index 0000000..7151719 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_you_in_army.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/bg_you_in_army_round.xml b/app/src/main/res/mipmap-anydpi-v26/bg_you_in_army_round.xml new file mode 100644 index 0000000..7151719 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/bg_you_in_army_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/emptiness.xml b/app/src/main/res/mipmap-anydpi-v26/emptiness.xml new file mode 100644 index 0000000..1c51bee --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/emptiness.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/emptiness_round.xml b/app/src/main/res/mipmap-anydpi-v26/emptiness_round.xml new file mode 100644 index 0000000..1c51bee --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/emptiness_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/main_bg.xml b/app/src/main/res/mipmap-anydpi-v26/main_bg.xml new file mode 100644 index 0000000..1462c9b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/main_bg.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/main_bg_round.xml b/app/src/main/res/mipmap-anydpi-v26/main_bg_round.xml new file mode 100644 index 0000000..1462c9b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/main_bg_round.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/bg_no_no.png b/app/src/main/res/mipmap-hdpi/bg_no_no.png new file mode 100644 index 0000000..79ab5a4 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_no_no.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_no_no_foreground.png b/app/src/main/res/mipmap-hdpi/bg_no_no_foreground.png new file mode 100644 index 0000000..350624c Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_no_no_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_no_no_round.png b/app/src/main/res/mipmap-hdpi/bg_no_no_round.png new file mode 100644 index 0000000..199e1f8 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_no_no_round.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_o.png b/app/src/main/res/mipmap-hdpi/bg_o.png new file mode 100644 index 0000000..e99760f Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_o.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_o_foreground.png b/app/src/main/res/mipmap-hdpi/bg_o_foreground.png new file mode 100644 index 0000000..aaf3f9a Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_o_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_o_round.png b/app/src/main/res/mipmap-hdpi/bg_o_round.png new file mode 100644 index 0000000..4110a5d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_o_round.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_offline_game.png b/app/src/main/res/mipmap-hdpi/bg_offline_game.png new file mode 100644 index 0000000..c62c2cf Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_offline_game.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_offline_game_foreground.png b/app/src/main/res/mipmap-hdpi/bg_offline_game_foreground.png new file mode 100644 index 0000000..23f9fc7 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_offline_game_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_offline_game_round.png b/app/src/main/res/mipmap-hdpi/bg_offline_game_round.png new file mode 100644 index 0000000..dbbbb73 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_offline_game_round.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_x.png b/app/src/main/res/mipmap-hdpi/bg_x.png new file mode 100644 index 0000000..9e330b5 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_x.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_x_foreground.png b/app/src/main/res/mipmap-hdpi/bg_x_foreground.png new file mode 100644 index 0000000..35780ec Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_x_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_x_round.png b/app/src/main/res/mipmap-hdpi/bg_x_round.png new file mode 100644 index 0000000..9b5ccde Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_x_round.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_you_in_army.png b/app/src/main/res/mipmap-hdpi/bg_you_in_army.png new file mode 100644 index 0000000..a8bc626 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_you_in_army.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_you_in_army_foreground.png b/app/src/main/res/mipmap-hdpi/bg_you_in_army_foreground.png new file mode 100644 index 0000000..9f2e56f Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_you_in_army_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/bg_you_in_army_round.png b/app/src/main/res/mipmap-hdpi/bg_you_in_army_round.png new file mode 100644 index 0000000..c867ca8 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/bg_you_in_army_round.png differ diff --git a/app/src/main/res/mipmap-hdpi/emptiness.png b/app/src/main/res/mipmap-hdpi/emptiness.png new file mode 100644 index 0000000..326cded Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/emptiness.png differ diff --git a/app/src/main/res/mipmap-hdpi/emptiness_foreground.png b/app/src/main/res/mipmap-hdpi/emptiness_foreground.png new file mode 100644 index 0000000..8393cf5 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/emptiness_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/emptiness_round.png b/app/src/main/res/mipmap-hdpi/emptiness_round.png new file mode 100644 index 0000000..ae644da Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/emptiness_round.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-hdpi/main_bg.png b/app/src/main/res/mipmap-hdpi/main_bg.png new file mode 100644 index 0000000..0497ac6 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/main_bg.png differ diff --git a/app/src/main/res/mipmap-hdpi/main_bg_foreground.png b/app/src/main/res/mipmap-hdpi/main_bg_foreground.png new file mode 100644 index 0000000..714d325 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/main_bg_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/main_bg_round.png b/app/src/main/res/mipmap-hdpi/main_bg_round.png new file mode 100644 index 0000000..a18e140 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/main_bg_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_no_no.png b/app/src/main/res/mipmap-mdpi/bg_no_no.png new file mode 100644 index 0000000..fa47207 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_no_no.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_no_no_foreground.png b/app/src/main/res/mipmap-mdpi/bg_no_no_foreground.png new file mode 100644 index 0000000..770254d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_no_no_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_no_no_round.png b/app/src/main/res/mipmap-mdpi/bg_no_no_round.png new file mode 100644 index 0000000..4bac57b Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_no_no_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_o.png b/app/src/main/res/mipmap-mdpi/bg_o.png new file mode 100644 index 0000000..8b46cd2 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_o.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_o_foreground.png b/app/src/main/res/mipmap-mdpi/bg_o_foreground.png new file mode 100644 index 0000000..8e74541 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_o_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_o_round.png b/app/src/main/res/mipmap-mdpi/bg_o_round.png new file mode 100644 index 0000000..922ff29 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_o_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_offline_game.png b/app/src/main/res/mipmap-mdpi/bg_offline_game.png new file mode 100644 index 0000000..842a3b5 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_offline_game.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_offline_game_foreground.png b/app/src/main/res/mipmap-mdpi/bg_offline_game_foreground.png new file mode 100644 index 0000000..b6e3f13 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_offline_game_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_offline_game_round.png b/app/src/main/res/mipmap-mdpi/bg_offline_game_round.png new file mode 100644 index 0000000..d917fd6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_offline_game_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_x.png b/app/src/main/res/mipmap-mdpi/bg_x.png new file mode 100644 index 0000000..0645e13 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_x.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_x_foreground.png b/app/src/main/res/mipmap-mdpi/bg_x_foreground.png new file mode 100644 index 0000000..a6c6320 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_x_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_x_round.png b/app/src/main/res/mipmap-mdpi/bg_x_round.png new file mode 100644 index 0000000..7d0c8f4 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_x_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_you_in_army.png b/app/src/main/res/mipmap-mdpi/bg_you_in_army.png new file mode 100644 index 0000000..7ebc64e Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_you_in_army.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_you_in_army_foreground.png b/app/src/main/res/mipmap-mdpi/bg_you_in_army_foreground.png new file mode 100644 index 0000000..8e57300 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_you_in_army_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/bg_you_in_army_round.png b/app/src/main/res/mipmap-mdpi/bg_you_in_army_round.png new file mode 100644 index 0000000..907dbd4 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/bg_you_in_army_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/emptiness.png b/app/src/main/res/mipmap-mdpi/emptiness.png new file mode 100644 index 0000000..da607ff Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/emptiness.png differ diff --git a/app/src/main/res/mipmap-mdpi/emptiness_foreground.png b/app/src/main/res/mipmap-mdpi/emptiness_foreground.png new file mode 100644 index 0000000..8b088ae Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/emptiness_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/emptiness_round.png b/app/src/main/res/mipmap-mdpi/emptiness_round.png new file mode 100644 index 0000000..87f35c4 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/emptiness_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/main_bg.png b/app/src/main/res/mipmap-mdpi/main_bg.png new file mode 100644 index 0000000..0dbe6da Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/main_bg.png differ diff --git a/app/src/main/res/mipmap-mdpi/main_bg_foreground.png b/app/src/main/res/mipmap-mdpi/main_bg_foreground.png new file mode 100644 index 0000000..ad8bcad Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/main_bg_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/main_bg_round.png b/app/src/main/res/mipmap-mdpi/main_bg_round.png new file mode 100644 index 0000000..a4cdb69 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/main_bg_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_no_no.png b/app/src/main/res/mipmap-xhdpi/bg_no_no.png new file mode 100644 index 0000000..3ddf89a Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_no_no.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_no_no_foreground.png b/app/src/main/res/mipmap-xhdpi/bg_no_no_foreground.png new file mode 100644 index 0000000..7e52ba2 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_no_no_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_no_no_round.png b/app/src/main/res/mipmap-xhdpi/bg_no_no_round.png new file mode 100644 index 0000000..fbf6395 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_no_no_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_o.png b/app/src/main/res/mipmap-xhdpi/bg_o.png new file mode 100644 index 0000000..29ebc88 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_o.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_o_foreground.png b/app/src/main/res/mipmap-xhdpi/bg_o_foreground.png new file mode 100644 index 0000000..8faebd1 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_o_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_o_round.png b/app/src/main/res/mipmap-xhdpi/bg_o_round.png new file mode 100644 index 0000000..5de4eff Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_o_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_offline_game.png b/app/src/main/res/mipmap-xhdpi/bg_offline_game.png new file mode 100644 index 0000000..6fb03d4 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_offline_game.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_offline_game_foreground.png b/app/src/main/res/mipmap-xhdpi/bg_offline_game_foreground.png new file mode 100644 index 0000000..18639dd Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_offline_game_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_offline_game_round.png b/app/src/main/res/mipmap-xhdpi/bg_offline_game_round.png new file mode 100644 index 0000000..4cb145e Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_offline_game_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_x.png b/app/src/main/res/mipmap-xhdpi/bg_x.png new file mode 100644 index 0000000..5d8b914 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_x.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_x_foreground.png b/app/src/main/res/mipmap-xhdpi/bg_x_foreground.png new file mode 100644 index 0000000..963ac42 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_x_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_x_round.png b/app/src/main/res/mipmap-xhdpi/bg_x_round.png new file mode 100644 index 0000000..780c147 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_x_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_you_in_army.png b/app/src/main/res/mipmap-xhdpi/bg_you_in_army.png new file mode 100644 index 0000000..3661013 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_you_in_army.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_you_in_army_foreground.png b/app/src/main/res/mipmap-xhdpi/bg_you_in_army_foreground.png new file mode 100644 index 0000000..3c23a9c Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_you_in_army_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/bg_you_in_army_round.png b/app/src/main/res/mipmap-xhdpi/bg_you_in_army_round.png new file mode 100644 index 0000000..841c89a Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/bg_you_in_army_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/emptiness.png b/app/src/main/res/mipmap-xhdpi/emptiness.png new file mode 100644 index 0000000..e3aa8be Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/emptiness.png differ diff --git a/app/src/main/res/mipmap-xhdpi/emptiness_foreground.png b/app/src/main/res/mipmap-xhdpi/emptiness_foreground.png new file mode 100644 index 0000000..01a3bfb Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/emptiness_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/emptiness_round.png b/app/src/main/res/mipmap-xhdpi/emptiness_round.png new file mode 100644 index 0000000..11bfe2d Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/emptiness_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/main_bg.png b/app/src/main/res/mipmap-xhdpi/main_bg.png new file mode 100644 index 0000000..0a66717 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/main_bg.png differ diff --git a/app/src/main/res/mipmap-xhdpi/main_bg_foreground.png b/app/src/main/res/mipmap-xhdpi/main_bg_foreground.png new file mode 100644 index 0000000..9d36776 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/main_bg_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/main_bg_round.png b/app/src/main/res/mipmap-xhdpi/main_bg_round.png new file mode 100644 index 0000000..2b704fb Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/main_bg_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_no_no.png b/app/src/main/res/mipmap-xxhdpi/bg_no_no.png new file mode 100644 index 0000000..ebae1c6 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_no_no.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_no_no_foreground.png b/app/src/main/res/mipmap-xxhdpi/bg_no_no_foreground.png new file mode 100644 index 0000000..9155447 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_no_no_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_no_no_round.png b/app/src/main/res/mipmap-xxhdpi/bg_no_no_round.png new file mode 100644 index 0000000..7834c1c Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_no_no_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_o.png b/app/src/main/res/mipmap-xxhdpi/bg_o.png new file mode 100644 index 0000000..e612d93 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_o.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_o_foreground.png b/app/src/main/res/mipmap-xxhdpi/bg_o_foreground.png new file mode 100644 index 0000000..f72d436 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_o_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_o_round.png b/app/src/main/res/mipmap-xxhdpi/bg_o_round.png new file mode 100644 index 0000000..83083c7 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_o_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_offline_game.png b/app/src/main/res/mipmap-xxhdpi/bg_offline_game.png new file mode 100644 index 0000000..5ae8026 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_offline_game.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_offline_game_foreground.png b/app/src/main/res/mipmap-xxhdpi/bg_offline_game_foreground.png new file mode 100644 index 0000000..f09f3c5 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_offline_game_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_offline_game_round.png b/app/src/main/res/mipmap-xxhdpi/bg_offline_game_round.png new file mode 100644 index 0000000..25e69d5 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_offline_game_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_x.png b/app/src/main/res/mipmap-xxhdpi/bg_x.png new file mode 100644 index 0000000..6280bcb Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_x.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_x_foreground.png b/app/src/main/res/mipmap-xxhdpi/bg_x_foreground.png new file mode 100644 index 0000000..ecd3712 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_x_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_x_round.png b/app/src/main/res/mipmap-xxhdpi/bg_x_round.png new file mode 100644 index 0000000..7d27f60 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_x_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_you_in_army.png b/app/src/main/res/mipmap-xxhdpi/bg_you_in_army.png new file mode 100644 index 0000000..299ce5b Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_you_in_army.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_you_in_army_foreground.png b/app/src/main/res/mipmap-xxhdpi/bg_you_in_army_foreground.png new file mode 100644 index 0000000..a781765 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_you_in_army_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/bg_you_in_army_round.png b/app/src/main/res/mipmap-xxhdpi/bg_you_in_army_round.png new file mode 100644 index 0000000..f275030 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/bg_you_in_army_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/emptiness.png b/app/src/main/res/mipmap-xxhdpi/emptiness.png new file mode 100644 index 0000000..543cc12 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/emptiness.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/emptiness_foreground.png b/app/src/main/res/mipmap-xxhdpi/emptiness_foreground.png new file mode 100644 index 0000000..40905b8 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/emptiness_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/emptiness_round.png b/app/src/main/res/mipmap-xxhdpi/emptiness_round.png new file mode 100644 index 0000000..f55c361 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/emptiness_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/main_bg.png b/app/src/main/res/mipmap-xxhdpi/main_bg.png new file mode 100644 index 0000000..00402c8 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/main_bg.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/main_bg_foreground.png b/app/src/main/res/mipmap-xxhdpi/main_bg_foreground.png new file mode 100644 index 0000000..b08095b Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/main_bg_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/main_bg_round.png b/app/src/main/res/mipmap-xxhdpi/main_bg_round.png new file mode 100644 index 0000000..2cb4efc Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/main_bg_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_no_no.png b/app/src/main/res/mipmap-xxxhdpi/bg_no_no.png new file mode 100644 index 0000000..2ddd961 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_no_no.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_no_no_foreground.png b/app/src/main/res/mipmap-xxxhdpi/bg_no_no_foreground.png new file mode 100644 index 0000000..bce5ba4 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_no_no_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_no_no_round.png b/app/src/main/res/mipmap-xxxhdpi/bg_no_no_round.png new file mode 100644 index 0000000..c29b315 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_no_no_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_o.png b/app/src/main/res/mipmap-xxxhdpi/bg_o.png new file mode 100644 index 0000000..557fb58 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_o.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_o_foreground.png b/app/src/main/res/mipmap-xxxhdpi/bg_o_foreground.png new file mode 100644 index 0000000..ed05b41 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_o_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_o_round.png b/app/src/main/res/mipmap-xxxhdpi/bg_o_round.png new file mode 100644 index 0000000..4a5945f Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_o_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_offline_game.png b/app/src/main/res/mipmap-xxxhdpi/bg_offline_game.png new file mode 100644 index 0000000..08225e1 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_offline_game.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_offline_game_foreground.png b/app/src/main/res/mipmap-xxxhdpi/bg_offline_game_foreground.png new file mode 100644 index 0000000..6920681 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_offline_game_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_offline_game_round.png b/app/src/main/res/mipmap-xxxhdpi/bg_offline_game_round.png new file mode 100644 index 0000000..3ee6ff8 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_offline_game_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_x.png b/app/src/main/res/mipmap-xxxhdpi/bg_x.png new file mode 100644 index 0000000..18e6cd8 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_x.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_x_foreground.png b/app/src/main/res/mipmap-xxxhdpi/bg_x_foreground.png new file mode 100644 index 0000000..8a0554e Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_x_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_x_round.png b/app/src/main/res/mipmap-xxxhdpi/bg_x_round.png new file mode 100644 index 0000000..ceb7441 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_x_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army.png b/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army.png new file mode 100644 index 0000000..de06765 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_foreground.png b/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_foreground.png new file mode 100644 index 0000000..75dea8c Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_round.png b/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_round.png new file mode 100644 index 0000000..57ce6a9 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/bg_you_in_army_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/emptiness.png b/app/src/main/res/mipmap-xxxhdpi/emptiness.png new file mode 100644 index 0000000..871b052 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/emptiness.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/emptiness_foreground.png b/app/src/main/res/mipmap-xxxhdpi/emptiness_foreground.png new file mode 100644 index 0000000..b6ca9a5 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/emptiness_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/emptiness_round.png b/app/src/main/res/mipmap-xxxhdpi/emptiness_round.png new file mode 100644 index 0000000..154ccd2 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/emptiness_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/main_bg.png b/app/src/main/res/mipmap-xxxhdpi/main_bg.png new file mode 100644 index 0000000..35c83a6 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/main_bg.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/main_bg_foreground.png b/app/src/main/res/mipmap-xxxhdpi/main_bg_foreground.png new file mode 100644 index 0000000..143db1c Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/main_bg_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/main_bg_round.png b/app/src/main/res/mipmap-xxxhdpi/main_bg_round.png new file mode 100644 index 0000000..2aa59b4 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/main_bg_round.png differ diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3bf7040 --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..474e42e --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Pai-fillo-nai + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..3a4f05c --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 0000000..fa0f996 --- /dev/null +++ b/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000..9ee9997 --- /dev/null +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/test/java/com/jopek/pai_fillo_nai/ExampleUnitTest.java b/app/src/test/java/com/jopek/pai_fillo_nai/ExampleUnitTest.java new file mode 100644 index 0000000..d6c5292 --- /dev/null +++ b/app/src/test/java/com/jopek/pai_fillo_nai/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.jopek.pai_fillo_nai; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file -- cgit v1.3.1