├── .gradle └── 3.3 │ ├── taskArtifacts │ ├── fileHashes.bin │ ├── fileSnapshots.bin │ ├── taskArtifacts.bin │ └── taskArtifacts.lock │ └── tasks │ └── _app_compileDebugJavaWithJavac │ ├── localClassSetAnalysis │ ├── localClassSetAnalysis.bin │ └── localClassSetAnalysis.lock │ └── localJarClasspathSnapshot │ ├── localJarClasspathSnapshot.bin │ └── localJarClasspathSnapshot.lock ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── gradle.xml ├── libraries │ ├── animated_vector_drawable_24_2_1.xml │ ├── appcompat_v7_24_2_1.xml │ ├── constraint_layout_1_0_2.xml │ ├── constraint_layout_solver_1_0_2.xml │ ├── espresso_core_2_2_2.xml │ ├── espresso_idling_resource_2_2_2.xml │ ├── exposed_instrumentation_api_publish_0_5.xml │ ├── hamcrest_core_1_3.xml │ ├── hamcrest_integration_1_3.xml │ ├── hamcrest_library_1_3.xml │ ├── javawriter_2_1_1.xml │ ├── javax_annotation_api_1_2.xml │ ├── javax_inject_1.xml │ ├── jsr305_2_0_1.xml │ ├── junit_4_12.xml │ ├── rules_0_5.xml │ ├── runner_0_5.xml │ ├── support_annotations_24_2_1.xml │ ├── support_compat_24_2_1.xml │ ├── support_core_ui_24_2_1.xml │ ├── support_core_utils_24_2_1.xml │ ├── support_fragment_24_2_1.xml │ ├── support_media_compat_24_2_1.xml │ ├── support_v4_24_2_1.xml │ └── support_vector_drawable_24_2_1.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── workspace.xml ├── CardGame.iml ├── README.md ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── codeclan │ │ └── example │ │ └── cardgame │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── codeclan │ │ │ └── example │ │ │ └── cardgame │ │ │ ├── Card.java │ │ │ ├── Deck.java │ │ │ ├── Game.java │ │ │ ├── Hand.java │ │ │ ├── MainActivity.java │ │ │ ├── Player.java │ │ │ ├── Rank.java │ │ │ ├── Rule.java │ │ │ ├── Suit.java │ │ │ └── WelcomeActivity.java │ └── res │ │ ├── drawable │ │ ├── ace_of_clubs.png │ │ ├── ace_of_diamonds.png │ │ ├── ace_of_hearts.png │ │ ├── ace_of_spades.png │ │ ├── black_joker.png │ │ ├── eight_of_clubs.png │ │ ├── eight_of_diamonds.png │ │ ├── eight_of_hearts.png │ │ ├── eight_of_spades.png │ │ ├── five_of_clubs.png │ │ ├── five_of_diamonds.png │ │ ├── five_of_hearts.png │ │ ├── five_of_spades.png │ │ ├── four_of_clubs.png │ │ ├── four_of_diamonds.png │ │ ├── four_of_hearts.png │ │ ├── four_of_spades.png │ │ ├── jack_of_clubs.png │ │ ├── jack_of_diamonds.png │ │ ├── jack_of_hearts.png │ │ ├── jack_of_spades.png │ │ ├── king_of_clubs.png │ │ ├── king_of_diamonds.png │ │ ├── king_of_hearts.png │ │ ├── king_of_spades.png │ │ ├── nine_of_clubs.png │ │ ├── nine_of_diamonds.png │ │ ├── nine_of_hearts.png │ │ ├── nine_of_spades.png │ │ ├── queen_of_clubs.png │ │ ├── queen_of_diamonds.png │ │ ├── queen_of_hearts.png │ │ ├── queen_of_spades.png │ │ ├── red_joker.png │ │ ├── seven_of_clubs.png │ │ ├── seven_of_diamonds.png │ │ ├── seven_of_hearts.png │ │ ├── seven_of_spades.png │ │ ├── six_of_clubs.png │ │ ├── six_of_diamonds.png │ │ ├── six_of_hearts.png │ │ ├── six_of_spades.png │ │ ├── ten_of_clubs.png │ │ ├── ten_of_diamonds.png │ │ ├── ten_of_hearts.png │ │ ├── ten_of_spades.png │ │ ├── three_of_clubs.png │ │ ├── three_of_diamonds.png │ │ ├── three_of_hearts.png │ │ ├── three_of_spades.png │ │ ├── two_of_clubs.png │ │ ├── two_of_diamonds.png │ │ ├── two_of_hearts.png │ │ └── two_of_spades.png │ │ ├── layout │ │ ├── activity_main.xml │ │ └── activity_welcome.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── codeclan │ └── example │ └── cardgame │ ├── CardTest.java │ ├── DeckTest.java │ ├── ExampleUnitTest.java │ ├── GameTest.java │ ├── HandTest.java │ ├── PlayerTest.java │ └── RuleTest.java ├── build.gradle ├── build ├── android-profile │ ├── profile-2017-05-27-20-32-32-763.rawproto │ ├── profile-2017-05-27-20-32-39-275.rawproto │ ├── profile-2017-05-27-20-44-57-405.rawproto │ ├── profile-2017-05-27-21-09-18-924.rawproto │ ├── profile-2017-05-27-21-10-28-906.rawproto │ ├── profile-2017-05-27-21-11-13-266.rawproto │ ├── profile-2017-05-27-21-12-22-292.rawproto │ ├── profile-2017-05-27-21-12-27-946.rawproto │ ├── profile-2017-05-27-21-12-31-727.rawproto │ ├── profile-2017-05-27-21-16-45-650.rawproto │ ├── profile-2017-05-27-21-21-41-292.rawproto │ ├── profile-2017-05-27-21-23-33-881.rawproto │ ├── profile-2017-05-27-21-25-25-819.rawproto │ ├── profile-2017-05-27-21-35-15-800.rawproto │ ├── profile-2017-05-27-21-38-43-264.rawproto │ ├── profile-2017-05-27-21-39-06-393.rawproto │ ├── profile-2017-05-27-21-40-28-283.rawproto │ ├── profile-2017-05-27-21-40-38-014.rawproto │ ├── profile-2017-05-27-21-42-26-475.rawproto │ ├── profile-2017-05-28-07-19-56-063.rawproto │ ├── profile-2017-05-28-07-27-07-913.rawproto │ ├── profile-2017-05-28-09-15-01-988.rawproto │ ├── profile-2017-05-28-09-15-06-418.rawproto │ ├── profile-2017-05-28-09-20-42-400.rawproto │ ├── profile-2017-05-28-14-44-10-659.rawproto │ ├── profile-2017-05-28-15-28-54-733.rawproto │ ├── profile-2017-05-28-15-31-14-774.rawproto │ ├── profile-2017-05-28-15-44-44-274.rawproto │ ├── profile-2017-05-28-15-44-49-953.rawproto │ ├── profile-2017-05-28-16-04-48-045.rawproto │ ├── profile-2017-05-28-16-31-55-062.rawproto │ ├── profile-2017-05-28-16-32-32-770.rawproto │ ├── profile-2017-05-28-16-35-37-799.rawproto │ ├── profile-2017-05-28-17-12-33-474.rawproto │ ├── profile-2017-05-28-17-21-59-300.rawproto │ ├── profile-2017-05-28-17-27-05-378.rawproto │ ├── profile-2017-05-28-17-28-42-896.rawproto │ ├── profile-2017-05-28-17-29-13-627.rawproto │ ├── profile-2017-05-28-22-26-28-042.rawproto │ ├── profile-2017-05-29-08-17-17-072.rawproto │ ├── profile-2017-05-29-09-45-45-114.rawproto │ ├── profile-2017-05-29-09-48-46-525.rawproto │ ├── profile-2017-05-29-09-52-09-835.rawproto │ ├── profile-2017-05-29-09-54-27-190.rawproto │ ├── profile-2017-05-29-09-54-49-750.rawproto │ ├── profile-2017-05-29-10-03-20-783.rawproto │ ├── profile-2017-05-29-10-06-19-186.rawproto │ ├── profile-2017-05-29-10-08-41-441.rawproto │ ├── profile-2017-05-29-10-16-34-173.rawproto │ ├── profile-2017-05-29-10-20-07-503.rawproto │ ├── profile-2017-05-29-10-49-46-260.rawproto │ ├── profile-2017-05-29-10-51-54-440.rawproto │ ├── profile-2017-05-29-10-52-27-256.rawproto │ ├── profile-2017-05-29-11-11-30-185.rawproto │ ├── profile-2017-05-29-11-12-00-957.rawproto │ ├── profile-2017-05-29-11-12-49-773.rawproto │ ├── profile-2017-05-29-11-14-06-001.rawproto │ ├── profile-2017-05-29-11-26-43-690.rawproto │ ├── profile-2017-05-29-11-26-56-541.rawproto │ ├── profile-2017-05-29-11-33-38-904.rawproto │ ├── profile-2017-05-29-11-37-27-326.rawproto │ ├── profile-2017-05-29-11-41-32-147.rawproto │ ├── profile-2017-05-29-11-42-49-150.rawproto │ ├── profile-2017-05-29-11-42-58-146.rawproto │ ├── profile-2017-05-29-11-44-55-343.rawproto │ ├── profile-2017-05-29-11-46-02-369.rawproto │ ├── profile-2017-05-29-11-59-28-482.rawproto │ ├── profile-2017-05-29-12-11-36-067.rawproto │ ├── profile-2017-05-29-12-14-04-332.rawproto │ ├── profile-2017-05-29-12-15-07-358.rawproto │ ├── profile-2017-05-29-12-15-53-213.rawproto │ ├── profile-2017-05-29-12-17-53-930.rawproto │ ├── profile-2017-05-29-12-54-59-026.rawproto │ ├── profile-2017-05-29-12-57-15-104.rawproto │ ├── profile-2017-05-29-13-00-01-960.rawproto │ ├── profile-2017-05-29-13-00-34-712.rawproto │ ├── profile-2017-05-29-13-24-23-018.rawproto │ ├── profile-2017-05-29-13-34-50-246.rawproto │ ├── profile-2017-05-29-13-51-04-870.rawproto │ ├── profile-2017-05-29-13-52-12-729.rawproto │ ├── profile-2017-05-29-13-56-14-864.rawproto │ ├── profile-2017-05-29-13-58-39-010.rawproto │ ├── profile-2017-05-29-13-59-15-453.rawproto │ ├── profile-2017-05-29-14-00-52-920.rawproto │ ├── profile-2017-05-29-14-02-23-582.rawproto │ ├── profile-2017-05-29-14-02-46-735.rawproto │ ├── profile-2017-05-29-14-06-28-165.rawproto │ ├── profile-2017-05-29-14-13-06-242.rawproto │ ├── profile-2017-05-29-14-59-17-349.rawproto │ ├── profile-2017-05-29-15-01-37-402.rawproto │ ├── profile-2017-05-29-15-02-31-981.rawproto │ ├── profile-2017-05-29-15-06-00-181.rawproto │ ├── profile-2017-05-29-15-06-39-382.rawproto │ ├── profile-2017-05-29-15-09-37-071.rawproto │ ├── profile-2017-05-29-15-10-11-753.rawproto │ ├── profile-2017-05-29-15-14-06-556.rawproto │ ├── profile-2017-05-29-15-19-21-301.rawproto │ ├── profile-2017-05-29-15-20-56-570.rawproto │ ├── profile-2017-05-29-15-23-15-370.rawproto │ ├── profile-2017-05-29-15-54-10-568.rawproto │ ├── profile-2017-05-29-21-26-53-131.rawproto │ ├── profile-2017-05-29-21-27-40-135.rawproto │ ├── profile-2017-05-29-21-28-18-719.rawproto │ ├── profile-2017-05-29-21-40-23-346.rawproto │ ├── profile-2017-05-29-21-48-02-255.rawproto │ ├── profile-2017-05-29-22-09-42-112.rawproto │ ├── profile-2017-05-29-22-11-53-967.rawproto │ ├── profile-2017-05-30-08-45-27-974.rawproto │ ├── profile-2017-05-30-08-53-42-092.rawproto │ ├── profile-2017-05-30-08-54-21-989.rawproto │ ├── profile-2017-05-30-08-54-51-939.rawproto │ ├── profile-2017-05-30-09-11-09-858.rawproto │ ├── profile-2017-05-30-09-11-45-150.rawproto │ ├── profile-2017-05-30-09-13-25-643.rawproto │ ├── profile-2017-05-30-09-13-46-283.rawproto │ ├── profile-2017-05-30-09-50-11-735.rawproto │ ├── profile-2017-05-30-09-50-54-635.rawproto │ ├── profile-2017-05-30-09-51-44-048.rawproto │ ├── profile-2017-05-30-09-52-40-188.rawproto │ ├── profile-2017-05-30-09-53-13-550.rawproto │ ├── profile-2017-05-30-09-54-10-867.rawproto │ ├── profile-2017-05-30-09-58-39-467.rawproto │ ├── profile-2017-05-30-10-02-15-205.rawproto │ ├── profile-2017-05-30-10-20-52-619.rawproto │ ├── profile-2017-05-30-10-22-10-850.rawproto │ ├── profile-2017-05-30-10-22-54-875.rawproto │ ├── profile-2017-05-30-10-24-03-775.rawproto │ ├── profile-2017-05-30-10-33-22-098.rawproto │ ├── profile-2017-05-30-10-45-57-238.rawproto │ ├── profile-2017-05-30-10-46-37-462.rawproto │ ├── profile-2017-05-30-10-49-10-567.rawproto │ ├── profile-2017-05-30-10-50-45-912.rawproto │ ├── profile-2017-05-30-10-51-23-207.rawproto │ ├── profile-2017-05-30-10-52-07-694.rawproto │ ├── profile-2017-05-30-10-53-12-111.rawproto │ ├── profile-2017-05-30-10-53-57-652.rawproto │ ├── profile-2017-05-30-10-54-57-010.rawproto │ ├── profile-2017-05-30-10-56-06-548.rawproto │ ├── profile-2017-05-30-10-56-53-818.rawproto │ ├── profile-2017-05-30-10-57-46-774.rawproto │ ├── profile-2017-05-30-11-37-23-940.rawproto │ ├── profile-2017-05-30-11-37-54-946.rawproto │ ├── profile-2017-05-30-11-38-53-171.rawproto │ ├── profile-2017-05-30-11-39-20-146.rawproto │ ├── profile-2017-05-30-11-39-49-312.rawproto │ ├── profile-2017-05-30-11-39-57-797.rawproto │ ├── profile-2017-05-30-11-41-03-455.rawproto │ ├── profile-2017-05-30-11-41-59-528.rawproto │ ├── profile-2017-05-30-11-43-04-988.rawproto │ ├── profile-2017-05-30-12-00-52-281.rawproto │ ├── profile-2017-05-30-12-03-39-989.rawproto │ ├── profile-2017-05-30-12-05-46-848.rawproto │ ├── profile-2017-05-30-12-06-53-886.rawproto │ ├── profile-2017-05-30-12-10-21-957.rawproto │ ├── profile-2017-05-30-12-11-58-754.rawproto │ ├── profile-2017-05-30-12-21-37-244.rawproto │ ├── profile-2017-05-30-12-25-36-936.rawproto │ ├── profile-2017-05-30-12-48-15-563.rawproto │ ├── profile-2017-05-30-12-51-15-574.rawproto │ ├── profile-2017-05-30-12-53-17-023.rawproto │ ├── profile-2017-05-30-12-55-01-460.rawproto │ ├── profile-2017-05-30-13-53-56-281.rawproto │ ├── profile-2017-05-30-14-23-35-051.rawproto │ ├── profile-2017-05-30-14-24-31-428.rawproto │ ├── profile-2017-05-30-14-26-38-434.rawproto │ ├── profile-2017-05-30-14-33-00-642.rawproto │ ├── profile-2017-05-30-14-34-44-365.rawproto │ ├── profile-2017-05-30-14-35-50-022.rawproto │ ├── profile-2017-05-30-14-37-37-260.rawproto │ ├── profile-2017-05-30-14-38-26-855.rawproto │ ├── profile-2017-05-30-14-39-26-200.rawproto │ ├── profile-2017-05-30-14-39-54-903.rawproto │ ├── profile-2017-05-30-14-40-32-369.rawproto │ ├── profile-2017-05-30-14-41-29-808.rawproto │ ├── profile-2017-05-30-14-42-32-357.rawproto │ ├── profile-2017-05-30-14-45-28-261.rawproto │ ├── profile-2017-05-30-15-02-59-005.rawproto │ ├── profile-2017-05-30-15-05-26-165.rawproto │ ├── profile-2017-05-30-15-06-00-423.rawproto │ ├── profile-2017-05-30-15-09-38-500.rawproto │ ├── profile-2017-05-30-15-10-21-548.rawproto │ ├── profile-2017-05-30-15-11-13-904.rawproto │ ├── profile-2017-05-30-15-13-07-467.rawproto │ ├── profile-2017-05-30-15-14-06-249.rawproto │ ├── profile-2017-05-30-15-27-52-757.rawproto │ ├── profile-2017-05-30-15-31-19-844.rawproto │ ├── profile-2017-05-30-15-46-23-063.rawproto │ ├── profile-2017-05-30-15-47-05-326.rawproto │ ├── profile-2017-05-30-15-58-45-532.rawproto │ ├── profile-2017-05-30-16-04-57-173.rawproto │ ├── profile-2017-05-30-16-06-08-584.rawproto │ ├── profile-2017-05-30-16-07-31-881.rawproto │ ├── profile-2017-05-30-16-09-43-468.rawproto │ ├── profile-2017-05-30-16-12-14-516.rawproto │ ├── profile-2017-05-30-16-13-25-258.rawproto │ ├── profile-2017-05-30-16-14-21-933.rawproto │ ├── profile-2017-05-30-16-16-56-794.rawproto │ ├── profile-2017-05-30-16-18-17-311.rawproto │ ├── profile-2017-05-30-16-24-13-969.rawproto │ ├── profile-2017-05-30-16-26-13-326.rawproto │ ├── profile-2017-05-30-16-28-21-847.rawproto │ ├── profile-2017-05-30-16-32-16-704.rawproto │ ├── profile-2017-05-30-16-36-46-005.rawproto │ ├── profile-2017-05-30-16-37-58-353.rawproto │ ├── profile-2017-05-30-16-39-52-844.rawproto │ ├── profile-2017-05-30-16-40-54-332.rawproto │ ├── profile-2017-05-30-16-47-40-301.rawproto │ ├── profile-2017-05-30-17-10-09-331.rawproto │ ├── profile-2017-05-30-17-10-40-812.rawproto │ ├── profile-2017-05-30-17-18-14-622.rawproto │ ├── profile-2017-05-30-17-22-03-350.rawproto │ ├── profile-2017-05-30-17-22-52-825.rawproto │ ├── profile-2017-05-30-17-23-28-484.rawproto │ ├── profile-2017-05-30-17-24-17-151.rawproto │ ├── profile-2017-05-30-17-25-05-705.rawproto │ ├── profile-2017-05-30-17-26-17-737.rawproto │ ├── profile-2017-05-30-17-27-01-290.rawproto │ ├── profile-2017-05-30-20-10-18-485.rawproto │ ├── profile-2017-05-30-20-13-51-600.rawproto │ ├── profile-2017-05-30-20-16-28-852.rawproto │ ├── profile-2017-05-30-20-19-54-190.rawproto │ ├── profile-2017-05-30-20-32-40-529.rawproto │ ├── profile-2017-05-30-20-33-19-629.rawproto │ ├── profile-2017-05-30-20-40-56-828.rawproto │ ├── profile-2017-05-30-21-05-33-180.rawproto │ ├── profile-2017-05-30-21-17-57-898.rawproto │ ├── profile-2017-05-30-21-31-32-445.rawproto │ ├── profile-2017-05-30-21-34-16-948.rawproto │ ├── profile-2017-05-30-21-48-23-520.rawproto │ ├── profile-2017-05-30-21-52-34-422.rawproto │ ├── profile-2017-05-31-07-23-57-079.rawproto │ ├── profile-2017-05-31-08-18-22-861.rawproto │ ├── profile-2017-05-31-08-33-54-658.rawproto │ ├── profile-2017-05-31-08-36-46-488.rawproto │ ├── profile-2017-05-31-08-38-49-528.rawproto │ ├── profile-2017-05-31-08-39-20-324.rawproto │ ├── profile-2017-05-31-08-39-53-458.rawproto │ ├── profile-2017-05-31-08-42-47-907.rawproto │ ├── profile-2017-05-31-09-42-14-222.rawproto │ ├── profile-2017-05-31-09-42-43-692.rawproto │ ├── profile-2017-05-31-09-50-58-336.rawproto │ ├── profile-2017-05-31-09-57-15-967.rawproto │ ├── profile-2017-05-31-10-22-15-281.rawproto │ ├── profile-2017-05-31-10-23-09-412.rawproto │ ├── profile-2017-05-31-10-24-23-971.rawproto │ ├── profile-2017-05-31-10-24-58-037.rawproto │ ├── profile-2017-05-31-10-35-34-918.rawproto │ ├── profile-2017-05-31-21-51-55-782.rawproto │ ├── profile-2017-06-01-11-24-58-327.rawproto │ └── profile-2017-06-02-11-24-51-605.rawproto └── generated │ └── mockable-android-24.jar ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local.properties └── settings.gradle /.gradle/3.3/taskArtifacts/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/taskArtifacts/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/3.3/taskArtifacts/fileSnapshots.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/taskArtifacts/fileSnapshots.bin -------------------------------------------------------------------------------- /.gradle/3.3/taskArtifacts/taskArtifacts.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/taskArtifacts/taskArtifacts.bin -------------------------------------------------------------------------------- /.gradle/3.3/taskArtifacts/taskArtifacts.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/taskArtifacts/taskArtifacts.lock -------------------------------------------------------------------------------- /.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin -------------------------------------------------------------------------------- /.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock -------------------------------------------------------------------------------- /.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin -------------------------------------------------------------------------------- /.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/.gradle/3.3/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/libraries/animated_vector_drawable_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/appcompat_v7_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/constraint_layout_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/constraint_layout_solver_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/espresso_core_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/espresso_idling_resource_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/exposed_instrumentation_api_publish_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_integration_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_library_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/javawriter_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/javax_annotation_api_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/javax_inject_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/jsr305_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/rules_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/runner_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/support_compat_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_ui_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_utils_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/support_fragment_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/support_media_compat_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/support_v4_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/support_vector_drawable_24_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /CardGame.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android_CardGame 2 | A card game android app developed in Java using Android studio. This 3 | application compares the highest hand of two players and declares a winner. 4 | 5 | This card game application was developed in Java using TDD on Android Studio. 6 | The user is shown a front page listing the rules and has an enter button to 7 | enter the game. On entering the game the user is dealt cards for two 8 | players making up two hands. Cards are randomly dealt from a full 9 | 52 card deck in the Java code. Their images appear on the screen by tying up the 10 | enums representing individual cards, the card gifs and the Android display code. 11 | The player selects four cards per hand. The java code adds up the rank total 12 | of each hand and compares the two players' hands. A message comes on the screen 13 | to inform the user which hand won the game. 14 | 15 | I have downloaded this application onto my mobile phone and it works fine. 16 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "25.0.3" 6 | defaultConfig { 7 | applicationId "com.codeclan.example.cardgame" 8 | minSdkVersion 16 9 | targetSdkVersion 24 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:24.2.1' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 29 | testCompile 'junit:junit:4.12' 30 | } 31 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/user/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/codeclan/example/cardgame/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.codeclan.example.cardgame", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Card.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | /** 4 | * Created by user on 27/05/2017. 5 | */ 6 | 7 | public class Card { 8 | 9 | private int value; 10 | private String cardDetails; 11 | private String cardIcon; 12 | 13 | private Rule rule; 14 | private Suit suit; 15 | private Rank rank; 16 | 17 | public Card() { 18 | 19 | } 20 | 21 | public Card(Suit suit, Rank rank) { 22 | this.rank = rank; 23 | this.value = value; 24 | this.suit = suit; 25 | this.cardDetails = cardDetails; 26 | this.cardIcon = cardIcon; 27 | } 28 | 29 | public Rank getRank() { 30 | return this.rank; 31 | } 32 | 33 | public void setRank(Rank newRank) { 34 | this.rank = newRank; 35 | } 36 | 37 | public int getValue(Rank rank) { 38 | rule = new Rule(rank.toString()); 39 | int value = rule.getValueFromRank(rank.toString()); 40 | return value; 41 | } 42 | 43 | public void setValue(int newValue) { 44 | this.value = newValue; 45 | } 46 | 47 | public Suit getSuit() { 48 | return this.suit; 49 | } 50 | 51 | public void getSuit(Suit newSuit) { 52 | this.suit = newSuit; 53 | } 54 | 55 | public String getCardIcon(String cardDetails) { 56 | 57 | // Spades 58 | 59 | if (cardDetails.equals("ACE of SPADES")) { 60 | cardIcon = "ace_of_spades"; 61 | } else if (cardDetails.equals("TWO of SPADES")) { 62 | cardIcon = "two_of_spades"; 63 | } else if (cardDetails.equals("THREE of SPADES")) { 64 | cardIcon = "three_of_spades"; 65 | } else if (cardDetails.equals("FOUR of SPADES")) { 66 | cardIcon = "four_of_spades"; 67 | } else if (cardDetails.equals("FIVE of SPADES")) { 68 | cardIcon = "five_of_spades"; 69 | } else if (cardDetails.equals("SIX of SPADES")) { 70 | cardIcon = "six_of_spades"; 71 | } else if (cardDetails.equals("SEVEN of SPADES")) { 72 | cardIcon = "seven_of_spades"; 73 | } else if (cardDetails.equals("EIGHT of SPADES")) { 74 | cardIcon = "eight_of_spades"; 75 | } else if (cardDetails.equals("NINE of SPADES")) { 76 | cardIcon = "nine_of_spades"; 77 | } else if (cardDetails.equals("TEN of SPADES")) { 78 | cardIcon = "ten_of_spades"; 79 | } else if (cardDetails.equals("JACK of SPADES")) { 80 | cardIcon = "jack_of_spades"; 81 | } else if (cardDetails.equals("QUEEN of SPADES")) { 82 | cardIcon = "queen_of_spades"; 83 | } else if (cardDetails.equals("KING of SPADES")) { 84 | cardIcon = "king_of_spades"; 85 | } 86 | 87 | // Clubs 88 | 89 | if (cardDetails.equals("ACE of CLUBS")) { 90 | cardIcon = "ace_of_clubs"; 91 | } else if (cardDetails.equals("TWO of CLUBS")) { 92 | cardIcon = "two_of_clubs"; 93 | } else if (cardDetails.equals("THREE of CLUBS")) { 94 | cardIcon = "three_of_clubs"; 95 | } else if (cardDetails.equals("FOUR of CLUBS")) { 96 | cardIcon = "four_of_clubs"; 97 | } else if (cardDetails.equals("FIVE of CLUBS")) { 98 | cardIcon = "five_of_clubs"; 99 | } else if (cardDetails.equals("SIX of CLUBS")) { 100 | cardIcon = "six_of_clubs"; 101 | } else if (cardDetails.equals("SEVEN of CLUBS")) { 102 | cardIcon = "seven_of_clubs"; 103 | } else if (cardDetails.equals("EIGHT of CLUBS")) { 104 | cardIcon = "eight_of_clubs"; 105 | } else if (cardDetails.equals("NINE of CLUBS")) { 106 | cardIcon = "nine_of_clubs"; 107 | } else if (cardDetails.equals("TEN of CLUBS")) { 108 | cardIcon = "ten_of_clubs"; 109 | } else if (cardDetails.equals("JACK of CLUBS")) { 110 | cardIcon = "jack_of_clubs"; 111 | } else if (cardDetails.equals("QUEEN of CLUBS")) { 112 | cardIcon = "queen_of_clubs"; 113 | } else if (cardDetails.equals("KING of CLUBS")) { 114 | cardIcon = "king_of_clubs"; 115 | } 116 | 117 | // Hearts 118 | 119 | if (cardDetails.equals("ACE of HEARTS")) { 120 | cardIcon = "ace_of_hearts"; 121 | } else if (cardDetails.equals("TWO of HEARTS")) { 122 | cardIcon = "two_of_hearts"; 123 | } else if (cardDetails.equals("THREE of HEARTS")) { 124 | cardIcon = "three_of_hearts"; 125 | } else if (cardDetails.equals("FOUR of HEARTS")) { 126 | cardIcon = "four_of_hearts"; 127 | } else if (cardDetails.equals("FIVE of HEARTS")) { 128 | cardIcon = "five_of_hearts"; 129 | } else if (cardDetails.equals("SIX of HEARTS")) { 130 | cardIcon = "six_of_hearts"; 131 | } else if (cardDetails.equals("SEVEN of HEARTS")) { 132 | cardIcon = "seven_of_hearts"; 133 | } else if (cardDetails.equals("EIGHT of HEARTS")) { 134 | cardIcon = "eight_of_hearts"; 135 | } else if (cardDetails.equals("NINE of HEARTS")) { 136 | cardIcon = "nine_of_hearts"; 137 | } else if (cardDetails.equals("TEN of HEARTS")) { 138 | cardIcon = "ten_of_hearts"; 139 | } else if (cardDetails.equals("JACK of HEARTS")) { 140 | cardIcon = "jack_of_hearts"; 141 | } else if (cardDetails.equals("QUEEN of HEARTS")) { 142 | cardIcon = "queen_of_hearts"; 143 | } else if (cardDetails.equals("KING of HEARTS")) { 144 | cardIcon = "king_of_hearts"; 145 | } 146 | 147 | // Diamonds 148 | 149 | if (cardDetails.equals("ACE of DIAMONDS")) { 150 | cardIcon = "ace_of_diamonds"; 151 | } else if (cardDetails.equals("TWO of DIAMONDS")) { 152 | cardIcon = "two_of_diamonds"; 153 | } else if (cardDetails.equals("THREE of DIAMONDS")) { 154 | cardIcon = "three_of_diamonds"; 155 | } else if (cardDetails.equals("FOUR of DIAMONDS")) { 156 | cardIcon = "four_of_diamonds"; 157 | } else if (cardDetails.equals("FIVE of DIAMONDS")) { 158 | cardIcon = "five_of_diamonds"; 159 | } else if (cardDetails.equals("SIX of DIAMONDS")) { 160 | cardIcon = "six_of_diamonds"; 161 | } else if (cardDetails.equals("SEVEN of DIAMONDS")) { 162 | cardIcon = "seven_of_diamonds"; 163 | } else if (cardDetails.equals("EIGHT of DIAMONDS")) { 164 | cardIcon = "eight_of_diamonds"; 165 | } else if (cardDetails.equals("NINE of DIAMONDS")) { 166 | cardIcon = "nine_of_diamonds"; 167 | } else if (cardDetails.equals("TEN of DIAMONDS")) { 168 | cardIcon = "ten_of_diamonds"; 169 | } else if (cardDetails.equals("JACK of DIAMONDS")) { 170 | cardIcon = "jack_of_diamonds"; 171 | } else if (cardDetails.equals("QUEEN of DIAMONDS")) { 172 | cardIcon = "queen_of_diamonds"; 173 | } else if (cardDetails.equals("KING of DIAMONDS")) { 174 | cardIcon = "king_of_diamonds"; 175 | } 176 | 177 | return this.cardIcon; 178 | } 179 | 180 | } 181 | -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Deck.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Random; 5 | 6 | /** 7 | * Created by user on 27/05/2017. 8 | */ 9 | 10 | public class Deck { 11 | 12 | private Suit suit; 13 | private Rank rank; 14 | private ArrayList deck; 15 | private Random randomGenerator = new Random(); 16 | 17 | public Deck() { 18 | this.deck = new ArrayList(); 19 | createDeck(); 20 | } 21 | 22 | public int deckSize(){ 23 | return deck.size(); 24 | } 25 | 26 | public void createDeck(){ 27 | for (Suit suit : Suit.values()) { 28 | for (Rank rank : Rank.values()) { 29 | deck.add( new Card(suit, rank)); 30 | } 31 | } 32 | } 33 | 34 | public Card dealRandomCard() { 35 | int index = randomGenerator.nextInt(deck.size()); 36 | Card card = deck.get(index); 37 | return card; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Game.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * Created by user on 27/05/2017. 7 | */ 8 | 9 | public class Game { 10 | 11 | private int player1HandOldValue; 12 | private int player1HandNewValue; 13 | private int player2HandOldValue; 14 | private int player2HandNewValue; 15 | 16 | private Suit player1DealtCardSuit; 17 | private Rank player1DealtCardRank; 18 | private Suit player2DealtCardSuit; 19 | private Rank player2DealtCardRank; 20 | 21 | private ArrayList player1Hand; 22 | private ArrayList player2Hand; 23 | 24 | private String player1Name; 25 | private String player2Name; 26 | 27 | private String result; 28 | private String resultMessage; 29 | 30 | Hand hand1 = new Hand(); 31 | Hand hand2 = new Hand(); 32 | 33 | Player player1 = new Player("Player1", hand1); 34 | Player player2 = new Player("Player2", hand2); 35 | 36 | Rule rule = new Rule(); 37 | 38 | public Game(Player player1, Player player2) { 39 | this.player1 = player1; 40 | this.player2 = player2; 41 | this.player1Name = player1Name; 42 | this.player2Name = player2Name; 43 | this.player1Hand = new ArrayList(); 44 | this.player2Hand = new ArrayList(); 45 | this.player1HandOldValue = player1HandOldValue; 46 | this.player1HandNewValue = player1HandNewValue; 47 | this.player2HandOldValue = player2HandOldValue; 48 | this.player2HandNewValue = player2HandNewValue; 49 | this.player1DealtCardSuit = player1DealtCardSuit; 50 | this.player1DealtCardRank = player1DealtCardRank; 51 | this.player2DealtCardSuit = player2DealtCardSuit; 52 | this.player2DealtCardRank = player2DealtCardRank; 53 | } 54 | 55 | public Player getPlayer1() { 56 | return this.player1; 57 | } 58 | 59 | public Player getPlayer2() { 60 | return this.player2; 61 | } 62 | 63 | public Hand getPlayer1Hand() { 64 | return this.player1.getHand(); 65 | } 66 | 67 | public Hand getPlayer2Hand() { 68 | return this.player2.getHand(); 69 | } 70 | 71 | public ArrayList dealPlayer1Card() { 72 | player1Hand = hand1.buildHand(); 73 | Player player1 = new Player("Player1", hand1); 74 | player1Name = player1.getName(); 75 | 76 | player1DealtCardSuit = hand1.getCardSuit(); 77 | player1DealtCardRank = hand1.getCardRank(); 78 | 79 | player1Hand = hand1.getCardsInHand(); 80 | for (Card card:player1Hand) { 81 | Suit suit = card.getSuit(); 82 | Rank rank = card.getRank(); 83 | int cardValue = card.getValue(rank); 84 | } 85 | 86 | player1HandNewValue = player1HandOldValue + hand1.getCardValue(); 87 | player1HandOldValue = player1HandNewValue; 88 | 89 | return player1Hand; 90 | } 91 | 92 | public int getPlayer1HandNewValue() { 93 | return player1HandNewValue; 94 | } 95 | 96 | public Suit getplayer1DealtCardSuit() { 97 | return this.player1DealtCardSuit; 98 | } 99 | 100 | public Rank getplayer1DealtCardRank() { 101 | return this.player1DealtCardRank; 102 | } 103 | 104 | public int getPlayer1HandSize() { 105 | return player1Hand.size(); 106 | } 107 | 108 | public ArrayList dealPlayer2Card() { 109 | player2Hand = hand2.buildHand(); 110 | Player player2 = new Player("Player2", hand2); 111 | player2Name = player2.getName(); 112 | 113 | player2DealtCardSuit = hand2.getCardSuit(); 114 | player2DealtCardRank = hand2.getCardRank(); 115 | 116 | player2Hand = hand2.getCardsInHand(); 117 | for (Card card:player2Hand) { 118 | Suit suit = card.getSuit(); 119 | Rank rank = card.getRank(); 120 | int cardValue = card.getValue(rank); 121 | } 122 | 123 | player2HandNewValue = player2HandOldValue + hand2.getCardValue(); 124 | player2HandOldValue = player2HandNewValue; 125 | 126 | return player2Hand; 127 | } 128 | 129 | public int getPlayer2HandNewValue() { 130 | return player2HandNewValue; 131 | } 132 | 133 | public Suit getplayer2DealtCardSuit() { 134 | return this.player2DealtCardSuit; 135 | } 136 | 137 | public Rank getplayer2DealtCardRank() { 138 | return this.player2DealtCardRank; 139 | } 140 | 141 | public int getPlayer2HandSize() { 142 | return player2Hand.size(); 143 | } 144 | 145 | public String getResult(int player1HandNewValue, int player2HandNewValue) { 146 | player1HandNewValue = getPlayer1HandNewValue(); 147 | player2HandNewValue = getPlayer2HandNewValue(); 148 | result = rule.getResult(player1HandNewValue, player2HandNewValue); 149 | if (result.equals("Player1")) { 150 | resultMessage = player1.getName() + " is the winner!!!"; 151 | } else if (result.equals("Player2")) { 152 | resultMessage = player2.getName() + " is the winner!!!"; 153 | } else { 154 | resultMessage = "It's a draw!!!"; 155 | } 156 | return resultMessage; 157 | } 158 | 159 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Hand.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * Created by user on 27/05/2017. 7 | */ 8 | 9 | public class Hand { 10 | 11 | private ArrayList cardsInHand; 12 | private Suit suit; 13 | private Rank rank; 14 | private int cardValue; 15 | private int handValue; 16 | private int handSize; 17 | 18 | Deck deck = new Deck(); 19 | 20 | public Hand() { 21 | this.cardsInHand = new ArrayList(); 22 | this.suit = suit; 23 | this.rank = rank; 24 | this.cardValue = cardValue; 25 | this.handValue = handValue; 26 | this.handSize = handSize; 27 | } 28 | 29 | public ArrayList buildHand() { 30 | this.handValue = 0; 31 | Card newCard = deck.dealRandomCard(); 32 | this.cardsInHand.add(newCard); 33 | for (Card card:cardsInHand) { 34 | this.suit = card.getSuit(); 35 | this.rank = card.getRank(); 36 | this.cardValue = card.getValue(rank); 37 | this.handValue = this.handValue + this.cardValue; 38 | } 39 | return cardsInHand; 40 | } 41 | 42 | public Suit getCardSuit() { 43 | return this.suit; 44 | } 45 | 46 | public Rank getCardRank() { 47 | return this.rank; 48 | } 49 | 50 | public int getCardValue() { 51 | return this.cardValue; 52 | } 53 | 54 | public int getHandValue() { 55 | return this.handValue; 56 | } 57 | 58 | public int getHandSize() { 59 | this.handSize = cardsInHand.size(); 60 | return this.handSize; 61 | } 62 | 63 | public ArrayList getCardsInHand() { 64 | return this.cardsInHand; 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | import android.graphics.drawable.Drawable; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.ImageView; 9 | import android.widget.TextView; 10 | 11 | import java.util.ArrayList; 12 | 13 | public class MainActivity extends AppCompatActivity { 14 | 15 | Hand hand1 = new Hand(); 16 | Hand hand2 = new Hand(); 17 | 18 | Player player1 = new Player("Player1", hand1); 19 | Player player2 = new Player("Player2", hand2); 20 | 21 | Game game = new Game(player1, player2); 22 | 23 | private Suit player1DealtCardSuit; 24 | private Rank player1DealtCardRank; 25 | private int player1HandOldValue; 26 | private int player1HandNewValue; 27 | private ArrayList player1Hand; 28 | private ArrayList hand1Details; 29 | private String player1CardDetails; 30 | private String player1EachIcon; 31 | private ArrayList Player1AllIcons; 32 | 33 | private Suit player2DealtCardSuit; 34 | private Rank player2DealtCardRank; 35 | private int player2HandOldValue; 36 | private int player2HandNewValue; 37 | private ArrayList player2Hand; 38 | private ArrayList hand2Details; 39 | private String player2CardDetails; 40 | private String player2EachIcon; 41 | private ArrayList Player2AllIcons; 42 | 43 | TextView textPlayer1LatestCard; 44 | Button buttonPlayer1; 45 | 46 | TextView textPlayer2LatestCard; 47 | Button buttonPlayer2; 48 | 49 | TextView textResult; 50 | Button buttonGameResult; 51 | 52 | // Button buttonAnotherPlay; 53 | 54 | ImageView player1FirstCardImage; 55 | ImageView player1SecondCardImage; 56 | ImageView player1ThirdCardImage; 57 | ImageView player1FourthCardImage; 58 | 59 | ImageView player2FirstCardImage; 60 | ImageView player2SecondCardImage; 61 | ImageView player2ThirdCardImage; 62 | ImageView player2FourthCardImage; 63 | 64 | @Override 65 | protected void onCreate(Bundle savedInstanceState) { 66 | super.onCreate(savedInstanceState); 67 | setContentView(R.layout.activity_main); 68 | 69 | buttonPlayer1 = (Button) findViewById(R.id.buttonPlayer1); 70 | textPlayer1LatestCard = (TextView) findViewById(R.id.player1Choice); 71 | 72 | player1FirstCardImage = (ImageView) findViewById(R.id.player1FirstCard); 73 | player1SecondCardImage = (ImageView) findViewById(R.id.player1SecondCard); 74 | player1ThirdCardImage = (ImageView) findViewById(R.id.player1ThirdCard); 75 | player1FourthCardImage = (ImageView) findViewById(R.id.player1FourthCard); 76 | 77 | buttonPlayer2 = (Button) findViewById(R.id.buttonPlayer2); 78 | textPlayer2LatestCard = (TextView) findViewById(R.id.player2Choice); 79 | 80 | player2FirstCardImage = (ImageView) findViewById(R.id.player2FirstCard); 81 | player2SecondCardImage = (ImageView) findViewById(R.id.player2SecondCard); 82 | player2ThirdCardImage = (ImageView) findViewById(R.id.player2ThirdCard); 83 | player2FourthCardImage = (ImageView) findViewById(R.id.player2FourthCard); 84 | 85 | buttonGameResult = (Button) findViewById(R.id.buttonResult); 86 | textResult = (TextView) findViewById(R.id.gameResult); 87 | 88 | // buttonAnotherPlay = (Button) findViewById(R.id.buttonPlayAgain); 89 | } 90 | 91 | public void onPlayer1ButtonClick(View view) { 92 | hand1Details = new ArrayList(); 93 | Player1AllIcons = new ArrayList(); 94 | 95 | ArrayList player1CardIconImageViews = new ArrayList<>(); 96 | player1CardIconImageViews.add(player1FirstCardImage); 97 | player1CardIconImageViews.add(player1SecondCardImage); 98 | player1CardIconImageViews.add(player1ThirdCardImage); 99 | player1CardIconImageViews.add(player1FourthCardImage); 100 | 101 | int imageViewIndex = 0; 102 | 103 | if(player1Hand != null && player1Hand.size() == 4) return; 104 | 105 | player1Hand = game.dealPlayer1Card(); 106 | player1DealtCardRank = game.getplayer1DealtCardRank(); 107 | player1DealtCardSuit = game.getplayer1DealtCardSuit(); 108 | 109 | for (Card card:player1Hand) { 110 | Suit suit = card.getSuit(); 111 | Rank rank = card.getRank(); 112 | int cardValue = card.getValue(rank); 113 | 114 | player1CardDetails = rank + " of " + suit; 115 | player1EachIcon = card.getCardIcon(player1CardDetails); 116 | 117 | setCardImage(player1EachIcon, player1CardIconImageViews.get(imageViewIndex)); 118 | imageViewIndex++; 119 | 120 | Player1AllIcons.add(player1EachIcon); 121 | hand1Details.add(player1CardDetails); 122 | } 123 | for (String player1Card: hand1Details) { 124 | System.out.println("Player 1 card in hand is: "+player1Card); 125 | } 126 | } 127 | 128 | public void onPlayer2ButtonClick(View view) { 129 | hand2Details = new ArrayList(); 130 | Player2AllIcons = new ArrayList(); 131 | 132 | ArrayList player2CardIconImageViews = new ArrayList<>(); 133 | player2CardIconImageViews.add(player2FirstCardImage); 134 | player2CardIconImageViews.add(player2SecondCardImage); 135 | player2CardIconImageViews.add(player2ThirdCardImage); 136 | player2CardIconImageViews.add(player2FourthCardImage); 137 | 138 | int imageViewIndex = 0; 139 | 140 | if(player2Hand != null && player2Hand.size() == 4) return; 141 | 142 | player2Hand = game.dealPlayer2Card(); 143 | player2DealtCardRank = game.getplayer2DealtCardRank(); 144 | player2DealtCardSuit = game.getplayer2DealtCardSuit(); 145 | 146 | for (Card card:player2Hand) { 147 | Suit suit = card.getSuit(); 148 | Rank rank = card.getRank(); 149 | int cardValue = card.getValue(rank); 150 | 151 | player2CardDetails = rank + " of " + suit; 152 | player2EachIcon = card.getCardIcon(player2CardDetails); 153 | 154 | setCardImage(player2EachIcon, player2CardIconImageViews.get(imageViewIndex)); 155 | imageViewIndex++; 156 | 157 | Player2AllIcons.add(player2EachIcon); 158 | hand2Details.add(player2CardDetails); 159 | } 160 | } 161 | 162 | public void onResultButtonClick(View view) { 163 | player1HandNewValue = game.getPlayer1HandNewValue(); 164 | player2HandNewValue = game.getPlayer2HandNewValue(); 165 | String outcome = game.getResult(player1HandNewValue, player2HandNewValue); 166 | textResult.setText(outcome); 167 | 168 | } 169 | 170 | // public void onPlayAgainButtonClick(View view) { 171 | // ArrayList player1Hand = new ArrayList(); 172 | // ArrayList player2Hand = new ArrayList(); 173 | // ArrayList player1CardIconImageViews = new ArrayList<>(); 174 | // ArrayList player2CardIconImageViews = new ArrayList<>(); 175 | // } 176 | 177 | public void setCardImage(String card, ImageView imageView) { 178 | //card param example= "ace_of_spades" 179 | int imageId = getResources().getIdentifier(card, "drawable", getPackageName()); 180 | imageView.setImageResource(imageId); 181 | } 182 | 183 | } 184 | -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Player.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | /** 4 | * Created by user on 27/05/2017. 5 | */ 6 | 7 | public class Player { 8 | 9 | private String name; 10 | private Hand hand; 11 | 12 | public Player() { 13 | 14 | } 15 | 16 | public Player(String name, Hand hand) { 17 | this.name = name; 18 | this.hand = hand; 19 | } 20 | 21 | public String getName() { 22 | return this.name; 23 | } 24 | 25 | public void setName(String newPlayer) { 26 | this.name = name; 27 | } 28 | 29 | public Hand getHand() { 30 | return this.hand; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Rank.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | /** 4 | * Created by user on 27/05/2017. 5 | */ 6 | 7 | public enum Rank { 8 | ACE, 9 | TWO, 10 | THREE, 11 | FOUR, 12 | FIVE, 13 | SIX, 14 | SEVEN, 15 | EIGHT, 16 | NINE, 17 | TEN, 18 | JACK, 19 | QUEEN, 20 | KING 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Rule.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | /** 4 | * Created by user on 27/05/2017. 5 | */ 6 | 7 | public class Rule { 8 | 9 | private String rank; 10 | private int value; 11 | 12 | private int player1HandValue; 13 | private int player2HandValue; 14 | 15 | private String result; 16 | 17 | public Rule() { 18 | 19 | } 20 | 21 | public Rule(int player1HandValue, int player2HandValue) { 22 | this.player1HandValue = player1HandValue; 23 | this.player2HandValue = player2HandValue; 24 | } 25 | 26 | public Rule(String rank) { 27 | this.rank = rank; 28 | this.value = value; 29 | } 30 | 31 | public String getRank() { 32 | return this.rank; 33 | } 34 | 35 | public int getValueFromRank(String rank) { 36 | switch(rank) { 37 | case "ACE": 38 | value = 1; 39 | break; 40 | case "TWO": 41 | value = 2; 42 | break; 43 | case "THREE": 44 | value = 3; 45 | break; 46 | case "FOUR": 47 | value = 4; 48 | break; 49 | case "FIVE": 50 | value = 5; 51 | break; 52 | case "SIX": 53 | value = 6; 54 | break; 55 | case "SEVEN": 56 | value = 7; 57 | break; 58 | case "EIGHT": 59 | value = 8; 60 | break; 61 | case "NINE": 62 | value = 9; 63 | break; 64 | case "TEN": 65 | value = 10; 66 | break; 67 | case "JACK": 68 | value = 10; 69 | break; 70 | case "QUEEN": 71 | value = 10; 72 | break; 73 | case "KING": 74 | value = 10; 75 | break; 76 | } 77 | return value; 78 | } 79 | 80 | public String getResult(int player1HandNewValue, int player2HandNewValue) { 81 | if (player1HandNewValue > player2HandNewValue) { 82 | return "Player1"; 83 | } else if (player2HandNewValue > player1HandNewValue) { 84 | return "Player2"; 85 | } else { 86 | return "Game Drawn"; 87 | } 88 | } 89 | 90 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/Suit.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | /** 4 | * Created by user on 27/05/2017. 5 | */ 6 | 7 | public enum Suit { 8 | HEARTS, 9 | CLUBS, 10 | DIAMONDS, 11 | SPADES 12 | } -------------------------------------------------------------------------------- /app/src/main/java/com/codeclan/example/cardgame/WelcomeActivity.java: -------------------------------------------------------------------------------- 1 | package com.codeclan.example.cardgame; 2 | 3 | /** 4 | * Created by user on 28/05/2017. 5 | */ 6 | 7 | import android.content.Intent; 8 | import android.os.Bundle; 9 | import android.support.v7.app.AppCompatActivity; 10 | import android.view.View; 11 | import android.widget.Button; 12 | 13 | public class WelcomeActivity extends AppCompatActivity { 14 | 15 | Button enterButton; 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | setContentView(R.layout.activity_welcome); 21 | } 22 | 23 | public void onUserEnterButtonClick(View view) { 24 | Intent intent = new Intent(this, MainActivity.class); 25 | startActivity(intent); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ace_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ace_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ace_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ace_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ace_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ace_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ace_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ace_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/black_joker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/black_joker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/eight_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/eight_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/eight_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/eight_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/eight_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/eight_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/eight_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/eight_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/five_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/five_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/five_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/five_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/five_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/five_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/five_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/five_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/four_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/four_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/four_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/four_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/four_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/four_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/four_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/four_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/jack_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/jack_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/jack_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/jack_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/jack_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/jack_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/jack_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/jack_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/king_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/king_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/king_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/king_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/king_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/king_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/king_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/king_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/nine_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/nine_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/nine_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/nine_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/nine_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/nine_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/nine_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/nine_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/queen_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/queen_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/queen_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/queen_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/queen_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/queen_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/queen_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/queen_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/red_joker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/red_joker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/seven_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/seven_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/seven_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/seven_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/seven_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/seven_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/seven_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/seven_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/six_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/six_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/six_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/six_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/six_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/six_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/six_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/six_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ten_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ten_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ten_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ten_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ten_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ten_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ten_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/ten_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/three_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/three_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/three_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/three_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/three_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/three_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/three_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/three_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/two_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/two_of_clubs.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/two_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/two_of_diamonds.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/two_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/two_of_hearts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/two_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gulfstream15/Android_CardGame/d97ff50530b68bb67ae671646c01097bddb376c6/app/src/main/res/drawable/two_of_spades.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |