Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .idea/codeStyles/Project.xml
100644 → 100755
Empty file.
Empty file modified .idea/codeStyles/codeStyleConfig.xml
100644 → 100755
Empty file.
Empty file modified .idea/gradle.xml
100644 → 100755
Empty file.
Empty file modified .idea/misc.xml
100644 → 100755
Empty file.
Empty file modified .idea/runConfigurations.xml
100644 → 100755
Empty file.
Empty file modified .idea/vcs.xml
100644 → 100755
Empty file.
Empty file modified app/.gitignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion app/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
buildToolsVersion "29.0.3"

defaultConfig {
applicationId "com.example.catanboard"
applicationId "com.catanboardapp.catanboard"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
Expand Down
Binary file added app/newrelease/release/app-release.apk
Binary file not shown.
20 changes: 20 additions & 0 deletions app/newrelease/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.catanboardapp.catanboard",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "app-release.apk"
}
]
}
Empty file modified app/proguard-rules.pro
100644 → 100755
Empty file.
Binary file added app/release/app-release.apk
Binary file not shown.
20 changes: 20 additions & 0 deletions app/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.catanboard",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "app-release.apk"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.catanboard
package com.catanboardapp.catanboard

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
13 changes: 9 additions & 4 deletions app/src/main/AndroidManifest.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.catanboard">
package="com.catanboardapp.catanboard">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/cb_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/cb_icon_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name="com.catanboardapp.catanboard.Dice"></activity>
<activity android:name="com.catanboardapp.catanboard.Rules" />
<activity
android:name="com.catanboardapp.catanboard.MainActivity"

android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Binary file added app/src/main/CB_icon-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/cb_icon-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions app/src/main/java/com/catanboardapp/catanboard/Dice.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.catanboardapp.catanboard

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.ImageView
import kotlin.random.Random

class Dice : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_dice)
//here's the roller listener gonna go with a new function being called onclick


}

fun diceroller(view: View) {

val randomno = Random.nextInt(6) + 1
val randomtwo = Random.nextInt(6) + 1

val imagedice1 = findViewById<ImageView>(R.id.dice1)
val imagedice2 = findViewById<ImageView>(R.id.dice2)

val drawableres = when (randomno) {
1 -> R.drawable.dice_1
2 -> R.drawable.dice_2
3 -> R.drawable.dice_3
4 -> R.drawable.dice_4
5 -> R.drawable.dice_5
else -> R.drawable.dice_6
}

val drawableres2 = when (randomtwo) {
1 -> R.drawable.dice_1
2 -> R.drawable.dice_2
3 -> R.drawable.dice_3
4 -> R.drawable.dice_4
5 -> R.drawable.dice_5
else -> R.drawable.dice_6
}
imagedice1.setImageResource(drawableres)
imagedice2.setImageResource(drawableres2)
}

fun gotoBoard(view: View) {
intent = Intent(this, MainActivity::class.java)

startActivity(intent)


}

fun gotoRules(view: View) {
intent = Intent(this, Rules::class.java)

startActivity(intent)


}
}
26 changes: 21 additions & 5 deletions ...va/com/example/catanboard/MainActivity.kt → .../catanboardapp/catanboard/MainActivity.kt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.example.catanboard
package com.catanboardapp.catanboard

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.ImageView
import android.widget.ToggleButton
import com.example.catanboard.R.layout.board
import com.catanboardapp.catanboard.R.layout.board
import kotlinx.android.synthetic.main.board.*


import java.util.*

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(board)


val btnn = findViewById<View>(R.id.Butt)


Expand Down Expand Up @@ -208,4 +208,20 @@ class MainActivity : AppCompatActivity() {
}

}

fun gotoRules(view: View) {
intent = Intent(this, Rules::class.java)

startActivity(intent)


}

fun gotoDice(view: View) {
intent = Intent(this, Dice::class.java)

startActivity(intent)


}
}
33 changes: 33 additions & 0 deletions app/src/main/java/com/catanboardapp/catanboard/Rules.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.catanboardapp.catanboard

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View

class Rules : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_rules)


}

fun gotoBoard(view: View) {
intent = Intent(this, MainActivity::class.java)

startActivity(intent)


}

fun gotoDice(view: View) {
intent = Intent(this, Dice::class.java)

startActivity(intent)


}

}
Empty file modified app/src/main/res/drawable-v24/ic_launcher_foreground.xml
100644 → 100755
Empty file.
Binary file removed app/src/main/res/drawable/bkg.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/bkg2.png
Binary file not shown.
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/bkg3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="24dp"
android:viewportHeight="628.0"
android:viewportWidth="726.0"
android:width="27dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="@color/background_blue"
android:pathData="m723,314c-60,103.9 -120,207.8 -180,311.8 -120,0 -240,0 -360,0C123,521.8 63,417.9 3,314 63,210.1 123,106.2 183,2.2c120,0 240,0 360,0C603,106.2 663,210.1 723,314Z"
android:strokeColor="#000000"
android:strokeWidth="0" />

</vector>
Empty file modified app/src/main/res/drawable/brick.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable/broken.png
Binary file not shown.
52 changes: 52 additions & 0 deletions app/src/main/res/drawable/dice_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@


<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="250dp"
android:viewportWidth="800"
android:viewportHeight="1000">
<path
android:fillAlpha="0.5"
android:fillColor="@color/darkest"
android:pathData="M740.8,635.42c-68.27,90.47 -249.77,201.76 -316,240.63a50.7,50.7 0,0 1,-49.93 0.81c-64.19,-35 -234.09,-133.88 -315.65,-242a14.69,14.69 0,0 1,-0.12 -17.49c77.58,-106.29 159.67,-258.89 341.06,-258.89 182,0 242.19,139.08 340.27,258.88A14.62,14.62 0,0 1,740.8 635.42Z"
android:strokeAlpha="0.5" />
<path
android:fillColor="@color/background_blue"
android:pathData="M704.9,630l-294.29,191.06l0,-340.85l294.29,-191.06l0,340.85z" />
<path
android:fillColor="@color/background_blue_darker"
android:pathData="M97.59,630l294.29,191.06l0,-340.85l-294.29,-191.06l0,340.85z" />
<path
android:fillColor="@color/background_blue_lighter"
android:pathData="M400.14,464.73l-293.19,-191.45l293.19,-156.31l295.39,156.31l-295.39,191.45z" />
<path
android:fillColor="@color/interlink"
android:pathData="M106.95,273.28l-9.36,15.87l294.29,191.06l8.26,-15.48l-293.19,-191.45z" />
<path
android:fillColor="@color/interlink"
android:pathData="M695.53,273.28l9.37,15.87l-294.29,191.06l-10.47,-15.48l295.39,-191.45z" />
<path
android:fillColor="@color/interlink"
android:pathData="M391.88,480.21h18.73v340.85h-18.73z" />
<path
android:fillColor="@color/interlink"
android:pathData="M400.14,464.73l-8.26,15.48l18.73,0l-10.47,-15.48z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M397.45,297.62a16.9,28.71 97.07,1 0,4.16 -33.54a16.9,28.71 97.07,1 0,-4.16 33.54z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M297.17,539.02a30.12,16.11 53.82,1 0,26.01 -19.02a30.12,16.11 53.82,1 0,-26.01 19.02z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M161.96,588.24a30.12,16.11 53.82,1 0,26.01 -19.02a30.12,16.11 53.82,1 0,-26.01 19.02z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M551.15,579.45a30.12,16.11 126.18,1 0,35.56 -48.62a30.12,16.11 126.18,1 0,-35.56 48.62z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M469.12,549.58a30.12,16.11 126.18,1 0,35.56 -48.62a30.12,16.11 126.18,1 0,-35.56 48.62z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M633.17,609.29a30.12,16.11 126.18,1 0,35.56 -48.62a30.12,16.11 126.18,1 0,-35.56 48.62z" />
</vector>
66 changes: 66 additions & 0 deletions app/src/main/res/drawable/dice_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!--
~ Copyright 2018, The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="250dp"
android:viewportWidth="800"
android:viewportHeight="1000">
<path
android:fillAlpha="0.5"
android:fillColor="@color/darkest"
android:pathData="M740.8,635.42c-68.27,90.47 -249.77,201.76 -316,240.63a50.7,50.7 0,0 1,-49.93 0.81c-64.19,-35 -234.09,-133.88 -315.65,-242a14.69,14.69 0,0 1,-0.12 -17.49c77.58,-106.29 159.67,-258.89 341.06,-258.89 182,0 242.19,139.08 340.27,258.88A14.62,14.62 0,0 1,740.8 635.42Z"
android:strokeAlpha="0.5" />
<path
android:fillColor="@color/background_blue"
android:pathData="M704.9,630l-294.29,191.06l0,-340.85l294.29,-191.06l0,340.85z" />
<path
android:fillColor="@color/background_blue_darker"
android:pathData="M97.59,630l294.29,191.06l0,-340.85l-294.29,-191.06l0,340.85z" />
<path
android:fillColor="@color/background_blue_lighter"
android:pathData="M400.14,464.73l-293.19,-191.45l293.19,-156.31l295.39,156.31l-295.39,191.45z" />
<path
android:fillColor="@color/interlink"
android:pathData="M106.95,273.28l-9.36,15.87l294.29,191.06l8.26,-15.48l-293.19,-191.45z" />
<path
android:fillColor="@color/interlink"
android:pathData="M695.53,273.28l9.37,15.87l-294.29,191.06l-10.47,-15.48l295.39,-191.45z" />
<path
android:fillColor="@color/interlink"
android:pathData="M391.88,480.21h18.73v340.85h-18.73z" />
<path
android:fillColor="@color/interlink"
android:pathData="M400.14,464.73l-8.26,15.48l18.73,0l-10.47,-15.48z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M520.85,303.25a16.9,28.71 97.07,1 0,4.16 -33.54a16.9,28.71 97.07,1 0,-4.16 33.54z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M273.33,291.99a16.9,28.71 97.07,1 0,4.16 -33.54a16.9,28.71 97.07,1 0,-4.16 33.54z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M229.56,563.64a30.12,16.11 53.82,1 0,26.01 -19.02a30.12,16.11 53.82,1 0,-26.01 19.02z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M311.58,533.77a30.12,16.11 53.82,1 0,26.01 -19.02a30.12,16.11 53.82,1 0,-26.01 19.02z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M147.54,593.49a30.12,16.11 53.82,1 0,26.01 -19.02a30.12,16.11 53.82,1 0,-26.01 19.02z" />
<path
android:fillColor="@color/burgundy_top"
android:pathData="M551.15,579.45a30.12,16.11 126.18,1 0,35.56 -48.62a30.12,16.11 126.18,1 0,-35.56 48.62z" />
</vector>
Loading