diff --git a/.gradle/2.10/taskArtifacts/cache.properties b/.gradle/2.10/taskArtifacts/cache.properties
new file mode 100644
index 0000000..ace96a5
--- /dev/null
+++ b/.gradle/2.10/taskArtifacts/cache.properties
@@ -0,0 +1 @@
+#Fri Sep 27 16:48:37 HKT 2019
diff --git a/.gradle/2.10/taskArtifacts/cache.properties.lock b/.gradle/2.10/taskArtifacts/cache.properties.lock
new file mode 100644
index 0000000..ac37f5e
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/cache.properties.lock differ
diff --git a/.gradle/2.10/taskArtifacts/fileHashes.bin b/.gradle/2.10/taskArtifacts/fileHashes.bin
new file mode 100644
index 0000000..a248291
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/fileHashes.bin differ
diff --git a/.gradle/2.10/taskArtifacts/fileSnapshots.bin b/.gradle/2.10/taskArtifacts/fileSnapshots.bin
new file mode 100644
index 0000000..f4093ec
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/fileSnapshots.bin differ
diff --git a/.gradle/2.10/taskArtifacts/outputFileStates.bin b/.gradle/2.10/taskArtifacts/outputFileStates.bin
new file mode 100644
index 0000000..c06b48d
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/outputFileStates.bin differ
diff --git a/.gradle/2.10/taskArtifacts/taskArtifacts.bin b/.gradle/2.10/taskArtifacts/taskArtifacts.bin
new file mode 100644
index 0000000..355ce09
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/taskArtifacts.bin differ
diff --git a/.gradle/5.4.1/executionHistory/executionHistory.bin b/.gradle/5.4.1/executionHistory/executionHistory.bin
new file mode 100644
index 0000000..6d74cdf
Binary files /dev/null and b/.gradle/5.4.1/executionHistory/executionHistory.bin differ
diff --git a/.gradle/5.4.1/executionHistory/executionHistory.lock b/.gradle/5.4.1/executionHistory/executionHistory.lock
new file mode 100644
index 0000000..ce76f11
Binary files /dev/null and b/.gradle/5.4.1/executionHistory/executionHistory.lock differ
diff --git a/.gradle/5.4.1/fileChanges/last-build.bin b/.gradle/5.4.1/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/.gradle/5.4.1/fileChanges/last-build.bin differ
diff --git a/.gradle/5.4.1/fileContent/fileContent.lock b/.gradle/5.4.1/fileContent/fileContent.lock
new file mode 100644
index 0000000..80d3894
Binary files /dev/null and b/.gradle/5.4.1/fileContent/fileContent.lock differ
diff --git a/.gradle/5.4.1/fileHashes/fileHashes.bin b/.gradle/5.4.1/fileHashes/fileHashes.bin
new file mode 100644
index 0000000..f1e978a
Binary files /dev/null and b/.gradle/5.4.1/fileHashes/fileHashes.bin differ
diff --git a/.gradle/5.4.1/fileHashes/fileHashes.lock b/.gradle/5.4.1/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..cbde323
Binary files /dev/null and b/.gradle/5.4.1/fileHashes/fileHashes.lock differ
diff --git a/.gradle/5.4.1/fileHashes/resourceHashesCache.bin b/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
new file mode 100644
index 0000000..cfd402f
Binary files /dev/null and b/.gradle/5.4.1/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/5.4.1/gc.properties b/.gradle/5.4.1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/.gradle/5.4.1/javaCompile/javaCompile.lock b/.gradle/5.4.1/javaCompile/javaCompile.lock
new file mode 100644
index 0000000..0bcfb3d
Binary files /dev/null and b/.gradle/5.4.1/javaCompile/javaCompile.lock differ
diff --git a/.gradle/5.4.1/javaCompile/taskHistory.bin b/.gradle/5.4.1/javaCompile/taskHistory.bin
new file mode 100644
index 0000000..e6acb48
Binary files /dev/null and b/.gradle/5.4.1/javaCompile/taskHistory.bin differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000..eff4dd0
Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..e49397d
--- /dev/null
+++ b/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Thu Oct 17 15:45:58 HKT 2019
+gradle.version=5.4.1
diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin
new file mode 100644
index 0000000..2c3e32f
Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
new file mode 100644
index 0000000..74988c3
Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/caches/gradle_models.ser b/.idea/caches/gradle_models.ser
new file mode 100644
index 0000000..29850a6
Binary files /dev/null and b/.idea/caches/gradle_models.ser differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..681f41a
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..ee635a3
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_23_4_0_aar.xml b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_23_4_0_aar.xml
new file mode 100644
index 0000000..c894a3b
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_23_4_0_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_4_0_aar.xml b/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_4_0_aar.xml
new file mode 100644
index 0000000..8e14543
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_4_0_aar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_design_23_4_0_aar.xml b/.idea/libraries/Gradle__com_android_support_design_23_4_0_aar.xml
new file mode 100644
index 0000000..c3ac4c1
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_design_23_4_0_aar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_4_0_aar.xml b/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_4_0_aar.xml
new file mode 100644
index 0000000..8f02980
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_4_0_aar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_annotations_23_4_0_jar.xml b/.idea/libraries/Gradle__com_android_support_support_annotations_23_4_0_jar.xml
new file mode 100644
index 0000000..ba66d26
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_annotations_23_4_0_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_v4_23_4_0_aar.xml b/.idea/libraries/Gradle__com_android_support_support_v4_23_4_0_aar.xml
new file mode 100644
index 0000000..c37c18c
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_v4_23_4_0_aar.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_vector_drawable_23_4_0_aar.xml b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_23_4_0_aar.xml
new file mode 100644
index 0000000..ba80057
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_23_4_0_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_2_2_1_aar.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_2_2_1_aar.xml
new file mode 100644
index 0000000..c54e1dd
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_2_2_1_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_2_2_1_aar.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_2_2_1_aar.xml
new file mode 100644
index 0000000..b3cf1ce
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_2_2_1_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_exposed_instrumentation_api_publish_0_4_1_aar.xml b/.idea/libraries/Gradle__com_android_support_test_exposed_instrumentation_api_publish_0_4_1_aar.xml
new file mode 100644
index 0000000..04ce7ea
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_exposed_instrumentation_api_publish_0_4_1_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_rules_0_4_1_aar.xml b/.idea/libraries/Gradle__com_android_support_test_rules_0_4_1_aar.xml
new file mode 100644
index 0000000..f3a57e0
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_rules_0_4_1_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_runner_0_4_1_aar.xml b/.idea/libraries/Gradle__com_android_support_test_runner_0_4_1_aar.xml
new file mode 100644
index 0000000..b0b6cdd
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_runner_0_4_1_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_uiautomator_uiautomator_v18_2_1_2_aar.xml b/.idea/libraries/Gradle__com_android_support_test_uiautomator_uiautomator_v18_2_1_2_aar.xml
new file mode 100644
index 0000000..e9ea76d
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_uiautomator_uiautomator_v18_2_1_2_aar.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
new file mode 100644
index 0000000..947e251
--- /dev/null
+++ b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
new file mode 100644
index 0000000..f97c138
--- /dev/null
+++ b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__javax_annotation_javax_annotation_api_1_2_jar.xml b/.idea/libraries/Gradle__javax_annotation_javax_annotation_api_1_2_jar.xml
new file mode 100644
index 0000000..5fdb330
--- /dev/null
+++ b/.idea/libraries/Gradle__javax_annotation_javax_annotation_api_1_2_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml b/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
new file mode 100644
index 0000000..5ac7d7b
--- /dev/null
+++ b/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__junit_junit_4_12_jar.xml b/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
new file mode 100644
index 0000000..24e5b72
--- /dev/null
+++ b/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
new file mode 100644
index 0000000..6b1e2e7
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
new file mode 100644
index 0000000..a8015c9
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
new file mode 100644
index 0000000..00bb125
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_mockito_mockito_core_1_9_5_jar.xml b/.idea/libraries/Gradle__org_mockito_mockito_core_1_9_5_jar.xml
new file mode 100644
index 0000000..22ddeb4
--- /dev/null
+++ b/.idea/libraries/Gradle__org_mockito_mockito_core_1_9_5_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_objenesis_objenesis_1_0_jar.xml b/.idea/libraries/Gradle__org_objenesis_objenesis_1_0_jar.xml
new file mode 100644
index 0000000..a973b62
--- /dev/null
+++ b/.idea/libraries/Gradle__org_objenesis_objenesis_1_0_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..0d45e8d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..683f036
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100755
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..115c780
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,369 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1569574084156
+
+
+ 1569574084156
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.mdecho b/README.mdecho
new file mode 100644
index 0000000..ab1fad2
--- /dev/null
+++ b/README.mdecho
@@ -0,0 +1 @@
+# Shooting-Game-App # Shooting-Game-App
diff --git a/ShootingGameFinal.iml b/ShootingGameFinal.iml
new file mode 100644
index 0000000..8fbe92c
--- /dev/null
+++ b/ShootingGameFinal.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100755
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/app.iml b/app/app.iml
new file mode 100644
index 0000000..c1ce223
--- /dev/null
+++ b/app/app.iml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100755
index 0000000..bcc9c74
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,39 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 23
+
+
+ defaultConfig {
+ applicationId "hk.ust.cse.comp107x.shootinggame"
+ minSdkVersion 18
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ testImplementation 'junit:junit:4.12'
+ testImplementation "org.mockito:mockito-core:1.9.5"
+
+ implementation 'com.android.support:appcompat-v7:23.4.0'
+ implementation 'com.android.support:design:23.4.0'
+ androidTestImplementation 'com.android.support.test:runner:0.4.1'
+ // Set this dependency to use JUnit 4 rules
+ androidTestImplementation 'com.android.support.test:rules:0.4.1'
+ // Set this dependency to build and run Espresso tests
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.1'
+ // Set this dependency to build and run UI Automator tests
+ androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
+ androidTestImplementation 'com.android.support:support-annotations:23.4.0'
+ // Optional -- Hamcrest library
+ androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100755
index 0000000..7273c26
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /Users/muppala/Library/Android/sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# 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 *;
+#}
diff --git a/app/src/androidTest/java/hk/ust/cse/comp107x/shootinggame/ApplicationTest.java b/app/src/androidTest/java/hk/ust/cse/comp107x/shootinggame/ApplicationTest.java
new file mode 100755
index 0000000..0e26265
--- /dev/null
+++ b/app/src/androidTest/java/hk/ust/cse/comp107x/shootinggame/ApplicationTest.java
@@ -0,0 +1,13 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * Testing Fundamentals
+ */
+public class ApplicationTest extends ApplicationTestCase {
+ public ApplicationTest() {
+ super(Application.class);
+ }
+}
\ No newline at end of file
diff --git a/app/src/androidTest/java/hk/ust/cse/comp107x/shootinggame/ShootingGameTest.java b/app/src/androidTest/java/hk/ust/cse/comp107x/shootinggame/ShootingGameTest.java
new file mode 100755
index 0000000..34593ca
--- /dev/null
+++ b/app/src/androidTest/java/hk/ust/cse/comp107x/shootinggame/ShootingGameTest.java
@@ -0,0 +1,39 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.content.Context;
+import android.support.test.rule.ActivityTestRule;
+import android.support.test.runner.AndroidJUnit4;
+import android.test.ActivityInstrumentationTestCase2;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * Created by muppala on 18/6/16.
+ */
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class ShootingGameTest{
+
+
+ @Rule
+ public ActivityTestRule mActivityRule = new ActivityTestRule<>(ShootingGame.class);
+
+ @Test
+ public void testNumSounds() throws Exception {
+ Context context = mActivityRule.getActivity().getBaseContext();
+ SoundEffects.INSTANCE.setContext(context);
+ int numSounds = SoundEffects.INSTANCE.getNumSounds();
+ Log.i("Test ", "numsounds is " + numSounds);
+ assertThat(numSounds, is(equalTo(3)));
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100755
index 0000000..7d16e3e
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/AndroidGuy.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/AndroidGuy.java
new file mode 100755
index 0000000..faec865
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/AndroidGuy.java
@@ -0,0 +1,85 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.RectF;
+
+/**
+ * Created by muppala on 13/6/16.
+ */
+public class AndroidGuy {
+ float x; // Guy's top left corner (x,y)
+ float y;
+ float stepX = 10; // Guy's step in (x,y) direction
+ float stepY = 5; // gives speed of motion, larger means faster speed
+ int lowerX, lowerY, upperX, upperY; // boundaries
+
+ Bitmap android_guy;
+
+
+ private Context mContext;
+
+ // Constructor
+ public AndroidGuy(int color, Context c) {
+
+ mContext = c;
+
+ // create a bitmap from the supplied image (the image is the icon that is part of the app)
+ android_guy = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(mContext.getResources(),
+ R.mipmap.ic_launcher),50,50, false);
+
+ }
+
+ public void setBounds(int lx, int ly, int ux, int uy) {
+ lowerX = lx;
+ lowerY = ly;
+ upperX = ux;
+ upperY = uy;
+
+ x = (float) ((upperX-50)*Math.random());
+ y = 0;
+ }
+
+ public boolean move() {
+ // Get new (x,y) position. Movement is always in vertical direction downwards
+ y += stepY;
+ // Detect when the guy reaches the bottom of the screen
+ // restart at a random location at the top of the screen
+ if (y + 50 > upperY) {
+ x = (float) ((upperX-50)*Math.random());
+ y = 0;
+ // TODO Make the sound corresponding to the Android Guy falling down the bottom of screen
+ SoundEffects.INSTANCE.playSound(SoundEffects.SOUND_GUY);
+ return true;
+ }
+ else
+ return true;
+ }
+
+ // When you reset, starts the Android Guy from a random X co-ordinate location
+ // at the top of the screen again
+ public void reset() {
+ x = (float) ((upperX-50)*Math.random());
+ y = 0;
+ }
+
+ // Returns the rectangle enclosing the Guy. Used for collision detection
+ public RectF getRect() {
+ return new RectF(x,y,x+50,y+50);
+ }
+
+ public float getX() {
+ return x;
+ }
+
+ public float getY() {
+ return y;
+ }
+
+ public void draw(Canvas canvas) {
+
+ canvas.drawBitmap(android_guy, x, y, null);
+ }
+}
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Bullet.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Bullet.java
new file mode 100755
index 0000000..274191b
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Bullet.java
@@ -0,0 +1,62 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.RectF;
+/**
+ * Created by muppala on 13/6/16.
+ */
+public class Bullet {
+ float radius = 5; // Bullet's radius
+ float x; // Bullet's center (x,y)
+ float y;
+ float stepX = 10; // Bullet's step of motion in (x,y) direction
+ float stepY = 5; // gives speed of motion, larger means faster speed
+ int lowerX, lowerY, upperX, upperY;
+ private Paint paint; // The paint style, color used for drawing
+
+ private Context mContext;
+
+ // Constructor
+ public Bullet(int color, Context c, float startx, float starty) {
+ paint = new Paint();
+ paint.setColor(color);
+
+ mContext = c;
+ x = startx;
+ y = starty;
+ }
+
+ public void setBounds(int lx, int ly, int ux, int uy) {
+ lowerX = lx;
+ lowerY = ly;
+ upperX = ux;
+ upperY = uy;
+ }
+
+ // Rectangle enclosing the bullet. Used for collision detection with Guy
+ public RectF getRect() {
+ return new RectF(x-radius,y-radius,x+radius,y+radius);
+ }
+
+ // Move the bullet upwards by stepY every time. This creates the upward motion.
+ public boolean move() {
+ // Get new (x,y) position
+ y -= stepY;
+ // Detect when the bullet reaches the top ofhte screen
+ // then remove the bullet
+ if (y - radius < 0) {
+ // TODO Make the sound corresponding to the bullet leaving from top of screen
+ SoundEffects.INSTANCE.playSound(SoundEffects.SOUND_BULLET);
+ return false;
+ }
+ else
+ return true;
+ }
+
+ // draw the bullet on the canvas
+ public void draw(Canvas canvas) {
+ canvas.drawCircle(x, y, radius, paint);
+ }
+}
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Cannon.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Cannon.java
new file mode 100755
index 0000000..bc58102
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Cannon.java
@@ -0,0 +1,67 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.util.Log;
+
+/**
+ * Created by muppala on 13/6/16.
+ */
+public class Cannon {
+ float x = -1; // Cannon's center (x,y)
+ float y = -1;
+ float stepX = 15; // Cannon's step in x direction
+ int lowerX, lowerY, upperX, upperY;
+ private Paint paint; // The paint style, color used for drawing
+
+ private Context mContext;
+
+ // Constructor
+ public Cannon(int color, Context c) {
+ paint = new Paint();
+ paint.setColor(color);
+
+ mContext = c;
+
+ }
+
+ public void setBounds(int lx, int ly, int ux, int uy) {
+ lowerX = lx;
+ lowerY = ly;
+ upperX = ux;
+ upperY = uy;
+
+ x = ux/2;
+ y = uy;
+ }
+
+ public void moveLeft() {
+ // Get new (x,y) position of the canvas by moving it left
+ // when the left button is clicked. Ensure that it does not
+ // move off the screen.
+ if (x - 30 > 0) {
+ x -= stepX;
+ }
+ }
+
+ public void moveRight() {
+ // Get new (x,y) position of the canvas by moving it right
+ // when the right button is clicked. Ensure that it does not
+ // move off the screen.
+ if (x + 30 < upperX) {
+ x += stepX;
+ }
+ }
+
+ public float getPosition() {
+ return x;
+ }
+
+ // Draw the cannon on the canvas
+ public void draw(Canvas canvas) {
+ canvas.drawLine(x, y - 100, x, y, paint);
+ canvas.drawRect(x - 30, y - 10, x + 30, y, paint);
+ canvas.drawRect(x - 10, y - 40, x + 10, y, paint);
+ }
+}
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/DrawView.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/DrawView.java
new file mode 100755
index 0000000..03d78b1
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/DrawView.java
@@ -0,0 +1,227 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+/**
+ * Created by muppala on 12/6/16.
+ */
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.RectF;
+import android.util.AttributeSet;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+
+import java.util.ArrayList;
+
+public class DrawView extends SurfaceView implements SurfaceHolder.Callback {
+
+ private int width, height;
+ private DrawViewThread drawviewthread;
+
+ Context mContext;
+
+ // We can have multiple bullets and explosions
+ // keep track of them in ArrayList
+ ArrayList bullets;
+ ArrayList explosions;
+ Cannon cannon;
+ AndroidGuy androidGuy;
+
+ public DrawView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ mContext = context;
+
+ getHolder().addCallback(this);
+
+ setFocusable(true);
+ this.requestFocus();
+
+ // create a cannon object
+ cannon = new Cannon(Color.BLUE,mContext);
+
+ // create arraylists to keep track of bullets and explosions
+ bullets = new ArrayList ();
+ explosions = new ArrayList();
+
+ // create the falling Android Guy
+ androidGuy = new AndroidGuy(Color.RED, mContext);
+
+ }
+
+ @Override
+ public void surfaceChanged(SurfaceHolder holder, int format, int width,
+ int height) {
+
+ }
+
+ @Override
+ public void surfaceCreated(SurfaceHolder holder) {
+
+ drawviewthread = new DrawViewThread(holder);
+ drawviewthread.setRunning(true);
+ drawviewthread.start();
+
+ }
+
+ @Override
+ public void surfaceDestroyed(SurfaceHolder holder) {
+
+ boolean retry = true;
+ drawviewthread.setRunning(false);
+
+ while (retry){
+ try {
+ drawviewthread.join();
+ retry = false;
+ }
+ catch (InterruptedException e){
+
+ }
+ }
+
+ }
+
+ public class DrawViewThread extends Thread{
+ private SurfaceHolder surfaceHolder;
+ private boolean threadIsRunning = true;
+
+ public DrawViewThread(SurfaceHolder holder){
+ surfaceHolder = holder;
+ setName("DrawViewThread");
+ }
+
+ public void setRunning (boolean running){
+ threadIsRunning = running;
+ }
+
+ public void run() {
+ Canvas canvas = null;
+
+ while (threadIsRunning) {
+
+ try {
+ canvas = surfaceHolder.lockCanvas(null);
+
+ synchronized(surfaceHolder){
+ drawGameBoard(canvas);
+ }
+ sleep(30);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ finally {
+ if (canvas != null)
+ surfaceHolder.unlockCanvasAndPost(canvas);
+ }
+ }
+ }
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+
+ width = w;
+ height = h;
+
+ cannon.setBounds(0,0,width, height);
+ androidGuy.setBounds(0,0,width,height);
+ for (int i = 0; i < bullets.size(); i++ ) {
+ bullets.get(i).setBounds(0,0,width,height);
+ }
+
+ }
+
+ public void drawGameBoard(Canvas canvas) {
+ canvas.drawColor(Color.WHITE); //if you want another background color
+ // Draw the cannon
+ cannon.draw(canvas);
+
+ // Draw all the bullets
+ for (int i = 0; i < bullets.size(); i++ ) {
+ if (bullets.get(i) != null) {
+ bullets.get(i).draw(canvas);
+
+ if (bullets.get(i).move() == false) {
+ bullets.remove(i);
+ }
+ }
+ }
+
+ // Draw all the explosions, at those locations where the bullet
+ // hits the Android Guy
+ for (int i = 0; i < explosions.size(); i++ ) {
+ if (explosions.get(i) != null) {
+ if (explosions.get(i).draw(canvas) == false) {
+ explosions.remove(i);
+ }
+ }
+ }
+
+ // If the Android Guy is falling, check to see if any of the bullets
+ // hit the Guy
+ if (androidGuy != null) {
+ androidGuy.draw(canvas);
+
+ RectF guyRect = androidGuy.getRect();
+
+ for (int i = 0; i < bullets.size(); i++ ) {
+
+ // The rectangle surrounding the Guy and Bullet intersect, then it's a collision
+ // Generate an explosion at that location and delete the Guy and bullet. Generate
+ // a new Android Guy to fall from the top.
+ if (RectF.intersects(guyRect, bullets.get(i).getRect())) {
+ explosions.add(new Explosion(Color.RED,mContext, androidGuy.getX(), androidGuy.getY()));
+ androidGuy.reset();
+ bullets.remove(i);
+ // Play the explosion sound by calling the SoundEffects class
+ // TODO Generate explosion sound
+ SoundEffects.INSTANCE.playSound(SoundEffects.SOUND_EXPLOSION);
+
+ break;
+ }
+
+ }
+
+ if (androidGuy.move() == false) {
+ androidGuy = null;
+ }
+ }
+
+ }
+
+ // Move the cannon left or right
+ public void moveCannonLeft() {
+ cannon.moveLeft();
+ }
+
+ public void moveCannonRight() {
+ cannon.moveRight();
+ }
+
+ // Whenever the user shoots a bullet, create a new bullet moving upwards
+ public void shootCannon() {
+
+ bullets.add(new Bullet(Color.RED, mContext, cannon.getPosition(), (float) (height - 40)));
+
+ }
+
+ public void stopGame(){
+ if (drawviewthread != null){
+ drawviewthread.setRunning(false);
+ }
+ }
+
+ public void resumeGame(){
+ if (drawviewthread != null){
+ drawviewthread.setRunning(true);
+ }
+ }
+
+ public void releaseResources(){
+
+ }
+
+}
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Explosion.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Explosion.java
new file mode 100755
index 0000000..0dff9af
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Explosion.java
@@ -0,0 +1,45 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.RectF;
+
+/**
+ * Created by muppala on 13/6/16.
+ */
+public class Explosion {
+ float x; // Ball's center (x,y)
+ float y;
+ int count = 30;
+
+ private static Bitmap explosion;
+
+
+ private Context mContext;
+
+ // Constructor
+ public Explosion(int color, Context c, float loc_x, float loc_y) {
+
+ mContext = c;
+
+ explosion = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(mContext.getResources(), R.drawable.explosion),50,50, false);
+
+ x = loc_x;
+ y = loc_y;
+
+ }
+
+ // Explosion is drawn for about 1 second on the screen (30 times) before being removed.
+ public boolean draw(Canvas canvas) {
+
+ if (count-- == 0)
+ return false;
+ else {
+ canvas.drawBitmap(explosion, x, y, null);
+ return true;
+ }
+ }
+}
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Score.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Score.java
new file mode 100755
index 0000000..8798eab
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/Score.java
@@ -0,0 +1,45 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Typeface;
+
+/**
+ * Created by muppala on 14/6/16.
+ */
+public class Score {
+
+ private Paint paint;
+ private int score;
+
+ // Constructor
+ public Score(int color) {
+ paint = new Paint();
+ // Set the font face and size of drawing text
+ paint.setTypeface(Typeface.MONOSPACE);
+ paint.setTextSize(24);
+ paint.setColor(color);
+
+ // TODO initialize score
+ score = 0;
+ }
+
+ public void incrementScore() {
+ // TODO Increment score
+ score++;
+ }
+
+ public void decrementScore() {
+ // TODO Decrement score
+ score--;
+ }
+
+ public int getScore() { return score; }
+
+ public void draw(Canvas canvas) {
+
+ // TODO use drawText(String, x co-ordinate, y-coordinate, paint) to
+ // draw text on the canvas. Position the text at (10,30).
+ canvas.drawText("Score: " + score, 10, 30, paint);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/ShootingGame.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/ShootingGame.java
new file mode 100755
index 0000000..3ab8572
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/ShootingGame.java
@@ -0,0 +1,150 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.media.MediaPlayer;
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.widget.ImageButton;
+
+public class ShootingGame extends AppCompatActivity implements View.OnClickListener {
+
+ private ImageButton moveLeftButton, moveRightButton, shootButton;
+ private DrawView drawView;
+ MediaPlayer player;
+ boolean play_music = true; // true when the music should be played, false otherwise
+ Menu menu;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_shooting_game);
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+
+ // Get a reference to the Custom View
+ drawView = (DrawView) findViewById(R.id.drawView);
+
+ // Get reference to the buttons and set their onClickListeners
+ moveLeftButton = (ImageButton) findViewById(R.id.moveLeftButton);
+ moveLeftButton.setOnClickListener(this);
+ moveRightButton = (ImageButton) findViewById(R.id.moveRightButton);
+ moveRightButton.setOnClickListener(this);
+ shootButton = (ImageButton) findViewById(R.id.shootButton);
+ shootButton.setOnClickListener(this);
+
+
+ // Create a new MediaPlayer object and initialize it. We will then start playing the
+ // background music when the activity resumes, and pause it when the activity pauses.
+ player = MediaPlayer.create(this, R.raw.braincandy);
+ player.setLooping(true);
+ play_music = true;
+
+ // Set the context fo the SoundEffects singleton class
+ // TODO Add context to the SoundEffects class
+ SoundEffects.INSTANCE.setContext(this);
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.menu_shooting_game, menu);
+
+ this.menu = menu;
+ if (play_music) {
+ menu.findItem(R.id.action_sound).setIcon(R.drawable.ic_volume_off_white_24dp);
+ }
+ else {
+ menu.findItem(R.id.action_sound).setIcon(R.drawable.ic_volume_up_white_24dp);
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle action bar item clicks here. The action bar will
+ // automatically handle clicks on the Home/Up button, so long
+ // as you specify a parent activity in AndroidManifest.xml.
+ int id = item.getItemId();
+
+ //noinspection SimplifiableIfStatement
+ if (id == R.id.action_settings) {
+ return true;
+ }
+ else if (id == R.id.action_sound) {
+
+ if (play_music) {
+ player.pause();
+ play_music=false;
+ menu.findItem(R.id.action_sound).setIcon(R.drawable.ic_volume_up_white_24dp);
+
+ }
+ else {
+ player.start();
+ play_music=true;
+ menu.findItem(R.id.action_sound).setIcon(R.drawable.ic_volume_off_white_24dp);
+ }
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ protected void onPause() {
+ drawView.stopGame();
+
+ if (play_music)
+ player.pause();
+
+ super.onPause();
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ drawView.resumeGame();
+
+ if (play_music)
+ player.start();
+ }
+
+ @Override
+ protected void onDestroy() {
+
+ player.stop();
+ player.reset();
+ player.release();
+ player = null;
+ play_music = false;
+
+ super.onDestroy();
+ }
+
+ @Override
+ public void onClick(View v) {
+
+ // Using the View's ID to distinguish which button was clicked
+ switch(v.getId()) {
+
+ case R.id.moveLeftButton:
+ drawView.moveCannonLeft();
+ break;
+
+ case R.id.moveRightButton:
+ drawView.moveCannonRight();
+ break;
+ case R.id.shootButton:
+ drawView.shootCannon();
+ break;
+ default:
+ break;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/hk/ust/cse/comp107x/shootinggame/SoundEffects.java b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/SoundEffects.java
new file mode 100755
index 0000000..ecc8c07
--- /dev/null
+++ b/app/src/main/java/hk/ust/cse/comp107x/shootinggame/SoundEffects.java
@@ -0,0 +1,73 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.media.AudioAttributes;
+import android.media.AudioManager;
+import android.media.SoundPool;
+import android.os.Build;
+import android.util.Log;
+
+import java.util.HashMap;
+
+/**
+ * Created by muppala on 18/6/16.
+ * This is an implementation of a Java Singleton class using the Enum approach. This creates
+ * a single instance of the class that can be accessed anywhere using SoundEffects.INSTANCE
+ */
+
+public enum SoundEffects {
+
+ INSTANCE;
+
+ public static final int SOUND_EXPLOSION=1;
+ public static final int SOUND_GUY=2;
+ public static final int SOUND_BULLET=3;
+
+ Context mContext;
+
+ private SoundPool mSoundPool;
+ private HashMap mSoundPoolMap;
+ private AudioManager mAudioManager;
+ private int streamVolume;
+
+ @SuppressWarnings("deprecation")
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ public void setContext(Context context) {
+
+ mContext = context;
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ AudioAttributes audioAttributes = new AudioAttributes.Builder()
+ .setUsage(AudioAttributes.USAGE_GAME)
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+ .build();
+
+ mSoundPool = new SoundPool.Builder()
+ .setMaxStreams(5)
+ .setAudioAttributes(audioAttributes)
+ .build();
+ } else {
+ mSoundPool = new SoundPool(5, AudioManager.STREAM_MUSIC, 0);
+ }
+
+ mSoundPoolMap = new HashMap();
+ mSoundPoolMap.put(SOUND_EXPLOSION, mSoundPool.load(context, R.raw.explosion,1));
+ // TODO Add sounds corresponding to the bullet and Android Guy
+ mSoundPoolMap.put(SOUND_GUY, mSoundPool.load(context, R.raw.beep4, 1));
+ mSoundPoolMap.put(SOUND_BULLET, mSoundPool.load(context, R.raw.beep9, 1));
+
+ mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
+ streamVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
+
+ }
+
+ public int getNumSounds() {
+ return mSoundPoolMap.size();
+ }
+
+ public void playSound(int sound) {
+ mSoundPool.play(mSoundPoolMap.get(sound),streamVolume, streamVolume, 100, 0, 1f);
+ Log.i("SoundEffects", "Playing Sound " + sound);
+ }
+}
diff --git a/app/src/main/res/drawable-hdpi/ic_adjust_black_48dp.png b/app/src/main/res/drawable-hdpi/ic_adjust_black_48dp.png
new file mode 100755
index 0000000..b62bfaa
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_adjust_black_48dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_adjust_white_48dp.png b/app/src/main/res/drawable-hdpi/ic_adjust_white_48dp.png
new file mode 100755
index 0000000..942ead5
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_adjust_white_48dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_arrow_back_black_48dp.png b/app/src/main/res/drawable-hdpi/ic_arrow_back_black_48dp.png
new file mode 100755
index 0000000..fa432c2
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_arrow_back_black_48dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_arrow_back_white_48dp.png b/app/src/main/res/drawable-hdpi/ic_arrow_back_white_48dp.png
new file mode 100755
index 0000000..746d775
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_arrow_back_white_48dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_arrow_forward_black_48dp.png b/app/src/main/res/drawable-hdpi/ic_arrow_forward_black_48dp.png
new file mode 100755
index 0000000..a124259
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_arrow_forward_black_48dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_48dp.png b/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_48dp.png
new file mode 100755
index 0000000..8c4c394
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_48dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_volume_off_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_volume_off_white_24dp.png
new file mode 100755
index 0000000..ce0c214
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_volume_off_white_24dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_volume_up_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_volume_up_white_24dp.png
new file mode 100755
index 0000000..57d7871
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_volume_up_white_24dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_adjust_black_48dp.png b/app/src/main/res/drawable-mdpi/ic_adjust_black_48dp.png
new file mode 100755
index 0000000..e3e0a1a
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_adjust_black_48dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_adjust_white_48dp.png b/app/src/main/res/drawable-mdpi/ic_adjust_white_48dp.png
new file mode 100755
index 0000000..233544c
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_adjust_white_48dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_arrow_back_black_48dp.png b/app/src/main/res/drawable-mdpi/ic_arrow_back_black_48dp.png
new file mode 100755
index 0000000..6842725
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_arrow_back_black_48dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_arrow_back_white_48dp.png b/app/src/main/res/drawable-mdpi/ic_arrow_back_white_48dp.png
new file mode 100755
index 0000000..ce5b878
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_arrow_back_white_48dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_arrow_forward_black_48dp.png b/app/src/main/res/drawable-mdpi/ic_arrow_forward_black_48dp.png
new file mode 100755
index 0000000..27767f1
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_arrow_forward_black_48dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_48dp.png b/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_48dp.png
new file mode 100755
index 0000000..878b6e5
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_48dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_volume_off_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_volume_off_white_24dp.png
new file mode 100755
index 0000000..4681ec1
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_volume_off_white_24dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_volume_up_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_volume_up_white_24dp.png
new file mode 100755
index 0000000..7cfd4c7
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_volume_up_white_24dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_adjust_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_adjust_black_48dp.png
new file mode 100755
index 0000000..e3e0a1a
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_adjust_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_adjust_white_48dp.png b/app/src/main/res/drawable-xhdpi/ic_adjust_white_48dp.png
new file mode 100755
index 0000000..233544c
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_adjust_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_arrow_back_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_arrow_back_black_48dp.png
new file mode 100755
index 0000000..fb5235f
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_arrow_back_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_48dp.png b/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_48dp.png
new file mode 100755
index 0000000..fb06e1d
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_arrow_forward_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_arrow_forward_black_48dp.png
new file mode 100755
index 0000000..8b5a681
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_arrow_forward_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_48dp.png b/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_48dp.png
new file mode 100755
index 0000000..5e93f88
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_volume_off_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_volume_off_white_24dp.png
new file mode 100755
index 0000000..732a1c0
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_volume_off_white_24dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_volume_up_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_volume_up_white_24dp.png
new file mode 100755
index 0000000..2ed0034
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_volume_up_white_24dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_adjust_black_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_adjust_black_48dp.png
new file mode 100755
index 0000000..8c8a95b
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_adjust_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_adjust_white_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_adjust_white_48dp.png
new file mode 100755
index 0000000..5a2573e
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_adjust_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_arrow_back_black_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_arrow_back_black_48dp.png
new file mode 100755
index 0000000..1e88d35
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_arrow_back_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_48dp.png
new file mode 100755
index 0000000..5d04720
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_black_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_black_48dp.png
new file mode 100755
index 0000000..5c5eda0
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_48dp.png
new file mode 100755
index 0000000..f8cf79f
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_volume_off_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_volume_off_white_24dp.png
new file mode 100755
index 0000000..474aae5
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_volume_off_white_24dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_volume_up_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_volume_up_white_24dp.png
new file mode 100755
index 0000000..2e751a4
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_volume_up_white_24dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_adjust_black_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_adjust_black_48dp.png
new file mode 100755
index 0000000..813974f
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_adjust_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_adjust_white_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_adjust_white_48dp.png
new file mode 100755
index 0000000..6713905
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_adjust_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_black_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_black_48dp.png
new file mode 100755
index 0000000..0d1a5e3
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_48dp.png
new file mode 100755
index 0000000..6c478d1
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_black_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_black_48dp.png
new file mode 100755
index 0000000..c0342c7
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white_48dp.png
new file mode 100755
index 0000000..c619b9a
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white_48dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_volume_off_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_volume_off_white_24dp.png
new file mode 100755
index 0000000..df06b06
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_volume_off_white_24dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_volume_up_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_volume_up_white_24dp.png
new file mode 100755
index 0000000..82972b4
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_volume_up_white_24dp.png differ
diff --git a/app/src/main/res/drawable/explosion.png b/app/src/main/res/drawable/explosion.png
new file mode 100755
index 0000000..530aaaf
Binary files /dev/null and b/app/src/main/res/drawable/explosion.png differ
diff --git a/app/src/main/res/layout/activity_shooting_game.xml b/app/src/main/res/layout/activity_shooting_game.xml
new file mode 100755
index 0000000..953ccda
--- /dev/null
+++ b/app/src/main/res/layout/activity_shooting_game.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/content_shooting_game.xml b/app/src/main/res/layout/content_shooting_game.xml
new file mode 100755
index 0000000..c9f16c4
--- /dev/null
+++ b/app/src/main/res/layout/content_shooting_game.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/menu/menu_shooting_game.xml b/app/src/main/res/menu/menu_shooting_game.xml
new file mode 100755
index 0000000..97c5329
--- /dev/null
+++ b/app/src/main/res/menu/menu_shooting_game.xml
@@ -0,0 +1,12 @@
+
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100755
index 0000000..cde69bc
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100755
index 0000000..c133a0c
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100755
index 0000000..bfa42f0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100755
index 0000000..324e72c
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100755
index 0000000..aee44e1
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/raw/beep4.mp3 b/app/src/main/res/raw/beep4.mp3
new file mode 100755
index 0000000..935b8ee
Binary files /dev/null and b/app/src/main/res/raw/beep4.mp3 differ
diff --git a/app/src/main/res/raw/beep9.mp3 b/app/src/main/res/raw/beep9.mp3
new file mode 100755
index 0000000..6d5af19
Binary files /dev/null and b/app/src/main/res/raw/beep9.mp3 differ
diff --git a/app/src/main/res/raw/braincandy.m4a b/app/src/main/res/raw/braincandy.m4a
new file mode 100755
index 0000000..445efc8
Binary files /dev/null and b/app/src/main/res/raw/braincandy.m4a differ
diff --git a/app/src/main/res/raw/explosion.m4a b/app/src/main/res/raw/explosion.m4a
new file mode 100755
index 0000000..7147ff3
Binary files /dev/null and b/app/src/main/res/raw/explosion.m4a differ
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100755
index 0000000..dbbdd40
--- /dev/null
+++ b/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100755
index 0000000..63fc816
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100755
index 0000000..3ab3e9c
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100755
index 0000000..812cb7b
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 16dp
+ 16dp
+ 16dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100755
index 0000000..18d3c88
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+ ShootingGame
+ Settings
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100755
index 0000000..545b9c6
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/test/java/hk/ust/cse/comp107x/shootinggame/ExampleUnitTest.java b/app/src/test/java/hk/ust/cse/comp107x/shootinggame/ExampleUnitTest.java
new file mode 100755
index 0000000..be2804f
--- /dev/null
+++ b/app/src/test/java/hk/ust/cse/comp107x/shootinggame/ExampleUnitTest.java
@@ -0,0 +1,15 @@
+package hk.ust.cse.comp107x.shootinggame;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * To work on unit tests, switch the Test Artifact in the Build Variants view.
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100755
index 0000000..f9fcceb
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,32 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ maven {
+ url 'https://maven.google.com/'
+ name 'Google'
+ }
+ google()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.5.1'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ maven {
+ url 'https://maven.google.com/'
+ name 'Google'
+ }
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100755
index 0000000..1d3591c
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100755
index 0000000..13372ae
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000..1b8b158
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu Oct 17 15:45:53 HKT 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100755
index 0000000..aec9973
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/local.properties b/local.properties
new file mode 100644
index 0000000..08f7aef
--- /dev/null
+++ b/local.properties
@@ -0,0 +1,8 @@
+## This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Sat Nov 02 22:47:16 KST 2019
+sdk.dir=/Users/brianpark/Library/Android/sdk
diff --git a/settings.gradle b/settings.gradle
new file mode 100755
index 0000000..e7b4def
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'