-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[둘리] 3, 4단계 오목 제출합니다. #34
Merged
Merged
Changes from 49 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
f4e19dd
rebase: step2
woowahan-pjs 1fea9a1
feat: set up the android project
woowahan-pjs ea810cb
feat: domain 이동
hyemdooly b8e4a8c
feat: add main activity and resources
woowahan-pjs 9d5a9ea
refactor(Omok, Controller): run 함수 삭제 및 컨트롤러로 이동
hyemdooly 2aeb6a6
feat(activity_main): TextView 추가
hyemdooly bfe2f72
feat(GameEventListener): GameEventListener 구현
hyemdooly 2fce9c1
refactor(Omok): 필요없는 주석 삭제
hyemdooly d9b8b7c
feat(Listener): 이벤트 리스너 구현 및 strings.xml에 string 정의
hyemdooly 3bf95f6
feat(MainActivity): MainActivity 구현
hyemdooly 3663712
refactor(Activity, Listener): 패키지 이동
hyemdooly 00b6655
refactor(Omok): endGame 함수 수정
hyemdooly bbc9fdd
refactor(OmokTest): OmokTest 테스트 재구현
hyemdooly dba7e4f
refactor(InputView, OutputView): InputView OutputView 인터페이스 삭제
hyemdooly 51d920c
refactor(TurnResult): TurnResult 생성, 점진적인 리팩터링
hyemdooly bcfeedb
refactor(MainActivity, PlayersTest): 필요없는 테스트 삭제, 도메인 변경에 따른 MainActi…
hyemdooly 15a1a7b
refactor(Players, Omok, Controller): Players 위치 Omok 안으로 변경, 안드로이드 Tu…
hyemdooly ebbbff4
refactor(MainActivity, GameEventListener): 버그 수정
hyemdooly 116de7b
refactor(OmokTest, PlayersTest): 리팩터링에 따른 테스트 수정
hyemdooly 7308130
feat(MainActivity, Omok, OmokConstract, OmokDBHelper, Players): 데이터베이…
hyemdooly 8776916
refactor(gitignore): gitignore 추가
hyemdooly a11e464
feat(DBManager): DB로부터 원하는 정보를 뽑아주는 DBManager 생성
hyemdooly ff54862
refactor(MainActivity): 메인 액티비티 리팩터링
hyemdooly 9c68fba
refactor(OmokDBManager): 필요없는 코드 삭제
hyemdooly 0bde83d
refactor(xml): 오목판 커스텀
hyemdooly 66200e5
refactor(MainActivity): 오목판 세팅 함수 분리
hyemdooly 8bedfaa
refactor(MainActivity): 필요없는 코드 삭제
hyemdooly c753b65
fix(WhitePlayerTest): 테스트 코드 수정
hyemdooly 5b456b2
Merge branch 'hyemdooly' into step4
hyemdooly 4508479
refactor(xml): 필요없는 파일 삭제
hyemdooly b0a5e0f
refactor(Players, Player): 놓은 돌의 개수를 반환하는 함수 작성
hyemdooly 31d1f8a
refactor(PlayerState): points 변수 protected 삭제
hyemdooly 774c598
refactor(PlayerState): points 변수 protected 복구, getAllPoints 깊은 복사
hyemdooly a52748f
refactor(Black,WhitePlayerTest): 필요없는 정보 숨기기
hyemdooly e760a35
refactor(Points): Point List 깊은 복사
hyemdooly 1c6b39f
refactor(PlayersTest): 테스트 코드 수정
hyemdooly 3c0c212
refactor(MainActivity): 코드 다이어트 및 by lazy 적용
hyemdooly e8a7478
refactor(all): ktlintFormatting
hyemdooly bc554db
refactor(Players): latestPlayer 불변으로 변경
hyemdooly 9d15441
refactor(Players, WhitePlayer, BlackPlayer): stone -> point로 명칭 변경, 최…
hyemdooly 2d9db1e
refactor(OmokGameEventListener): InputView의 인터페이스 삭제, GameEventListen…
hyemdooly 19e46b5
fix(BlackPlayer, WhitePlayer): 오류 수정
hyemdooly 2aab2ac
refactor(TurnResult): 턴의 결과를 모두 포함하도록 수정
hyemdooly 160abef
refactor(Omok): 필요없는 함수 삭제
hyemdooly 355405a
refactor(MainActivity, TurnEventListener): 도메인 변경에 따른 코드 변경
hyemdooly e602dd4
refactor(Players, MainActivity): 필요없는 코드 삭제, 변수 네이밍 변경
hyemdooly 3178d22
refactor(MainActivity, Controller, DBHelper, OutputView): 리스너, DB매니저 …
hyemdooly ccb0c20
refactor(ktlintFormat): ktlintformatting
hyemdooly b0e1fa1
refactor(DBHelper): db를 변수로 가지도록 변경
hyemdooly fd3b14b
refactor(Players): Players 팩토리 함수 생성
hyemdooly 6d1ac8b
refactor(MainActivity): applicationContext -> this 변경
hyemdooly 343d2fe
refactor(MainActivity): 많은 if문 when문 사용하여 정리
hyemdooly 14ad02c
refactor(PlayersTest): 팩토리 함수 구현으로 인한 변경
hyemdooly d347785
refactor(OmokDBHelper): 오목 도메인을 가질 수 있도록 수정
hyemdooly 98d9be3
refactor(MainActivity): onCreate에서 onClickListener 내용 분리
hyemdooly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
HELP.md | ||
.gradle | ||
# Gradle files | ||
.gradle/ | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/** | ||
!**/src/test/** | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
# Log/OS Files | ||
*.log | ||
|
||
# Android Studio generated files and folders | ||
captures/ | ||
.externalNativeBuild/ | ||
.cxx/ | ||
*.apk | ||
output.json | ||
|
||
# IntelliJ | ||
*.iml | ||
*.ipr | ||
out/ | ||
.idea/ | ||
misc.xml | ||
deploymentTargetDropDown.xml | ||
render.experimental.xml | ||
|
||
# Keystore files | ||
*.jks | ||
*.keystore | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
### VS Code ### | ||
.vscode/ | ||
# Android Profiling | ||
*.hprof |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
} | ||
|
||
android { | ||
namespace = "woowacourse.omok" | ||
compileSdk = 33 | ||
|
||
defaultConfig { | ||
applicationId = "woowacourse.omok" | ||
minSdk = 26 | ||
targetSdk = 33 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":domain")) | ||
implementation("androidx.core:core-ktx:1.9.0") | ||
implementation("androidx.appcompat:appcompat:1.6.0") | ||
implementation("com.google.android.material:material:1.7.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http:https://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Binary file not shown.
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android" | ||
xmlns:tools="http:https://schemas.android.com/tools"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.Oomok" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".activity.MainActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
125 changes: 125 additions & 0 deletions
125
app/src/main/java/woowacourse/omok/activity/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
package woowacourse.omok.activity | ||
|
||
import android.database.sqlite.SQLiteDatabase | ||
import android.os.Bundle | ||
import android.widget.ImageView | ||
import android.widget.TableLayout | ||
import android.widget.TableRow | ||
import android.widget.TextView | ||
import android.widget.Toast | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.core.view.children | ||
import domain.game.Omok | ||
import domain.game.Omok.Companion.OMOK_BOARD_SIZE | ||
import domain.player.BlackPlayer | ||
import domain.player.WhitePlayer | ||
import domain.point.Point | ||
import domain.point.Points | ||
import domain.result.TurnResult | ||
import domain.rule.BlackRenjuRule | ||
import domain.rule.WhiteRenjuRule | ||
import domain.state.PlayingState | ||
import domain.stone.StoneColor | ||
import view.mapper.toPresentation | ||
import woowacourse.omok.R | ||
import woowacourse.omok.db.OmokDBHelper | ||
|
||
class MainActivity : AppCompatActivity() { | ||
private val boards: List<ImageView> by lazy { getBoardViews() } | ||
private val descriptionView: TextView by lazy { findViewById(R.id.description) } | ||
private val dbHelper: OmokDBHelper by lazy { OmokDBHelper(applicationContext) } | ||
private val omok: Omok by lazy { initOmok() } | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_main) | ||
|
||
onStartGame() | ||
onStartTurn(omok.players.curPlayerColor) | ||
|
||
var result: TurnResult = TurnResult.Playing(false, omok.players) | ||
boards.forEachIndexed { index, view -> | ||
view.setOnClickListener { | ||
if (result !is TurnResult.Playing) return@setOnClickListener | ||
result = omok.takeTurn(calculateIndexToPoint(index)) | ||
onEndTurn(view, index, result) | ||
onEndGame(result) | ||
} | ||
} | ||
} | ||
|
||
override fun onStop() { | ||
super.onStop() | ||
if (!omok.players.isPlaying) dbHelper.deleteAll() | ||
} | ||
|
||
override fun onDestroy() { | ||
super.onDestroy() | ||
dbHelper.close() | ||
} | ||
|
||
private fun initOmok(): Omok { | ||
val blackIndexs = dbHelper.getIndexsByColor(StoneColor.BLACK.name) | ||
val whiteIndexs = dbHelper.getIndexsByColor(StoneColor.WHITE.name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DB 헬퍼를 raw값으로만 주고받도록 잘 만들어 주셨네요. 다만 이렇게 하게 되면 디비에 넣는 값이 변경되거나 스펙이 수정되면 코드를 외부에서 수정하는 상황이 생기기도 합니다. 이미 이름 자체가 오목 데이터베이스 헬퍼이기 때문에 오목에 대한 도메인을 가져도 된다고 생각합니다. |
||
|
||
blackIndexs.forEach { | ||
setStone(boards[it], StoneColor.BLACK) | ||
} | ||
whiteIndexs.forEach { | ||
setStone(boards[it], StoneColor.WHITE) | ||
} | ||
|
||
val blackPlayer = BlackPlayer(PlayingState(indexsToPoints(blackIndexs)), rule = BlackRenjuRule()) | ||
val whitePlayer = WhitePlayer(PlayingState(indexsToPoints(whiteIndexs)), rule = WhiteRenjuRule()) | ||
return Omok(blackPlayer, whitePlayer) | ||
} | ||
|
||
private fun onStartGame() { | ||
Toast.makeText(applicationContext, R.string.start_game, Toast.LENGTH_LONG).show() | ||
} | ||
|
||
private fun onEndGame(result: TurnResult) { | ||
val descriptionView = findViewById<TextView>(R.id.description) | ||
val context = applicationContext | ||
when (result) { | ||
is TurnResult.Playing -> return | ||
is TurnResult.Foul -> descriptionView.text = context.getString(R.string.is_forbidden).plus(context.getString(R.string.who_is_winner).format(result.winColor.toPresentation().text)) | ||
is TurnResult.Win -> descriptionView.text = context.getString(R.string.who_is_winner).format(result.winColor.toPresentation().text) | ||
} | ||
Toast.makeText(context, R.string.end_game, Toast.LENGTH_LONG).show() | ||
} | ||
|
||
private fun onStartTurn(stoneColor: StoneColor) { | ||
val context = applicationContext | ||
descriptionView.text = context.getString(R.string.who_is_turn).format(stoneColor.toPresentation().text) | ||
} | ||
|
||
private fun setStone(view: ImageView, color: StoneColor) { | ||
when (color) { | ||
StoneColor.BLACK -> view.setImageResource(R.drawable.pink_bear) | ||
StoneColor.WHITE -> view.setImageResource(R.drawable.white_bear) | ||
} | ||
} | ||
|
||
private fun onEndTurn(view: ImageView, index: Int, result: TurnResult) { | ||
val context = applicationContext | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MainActivity는 Context 타입이랍니다 😮 |
||
if (result is TurnResult.Playing && result.isExistPoint) Toast.makeText(context, R.string.already_exist, Toast.LENGTH_LONG).show() | ||
if (result !is TurnResult.Playing || !result.isExistPoint) { | ||
setStone(view, omok.players.curPlayerColor.next()) | ||
dbHelper.insert(index, omok.players.curPlayerColor.next().name) | ||
} | ||
descriptionView.text = context.getString(R.string.who_is_turn).format(result.players.curPlayerColor.toPresentation().text) | ||
} | ||
|
||
private fun getBoardViews(): List<ImageView> = findViewById<TableLayout>(R.id.board) | ||
.children | ||
.filterIsInstance<TableRow>() | ||
.flatMap { it.children } | ||
.filterIsInstance<ImageView>().toList() | ||
|
||
private fun calculateIndexToPoint(index: Int): Point = | ||
Point(index / OMOK_BOARD_SIZE + 1, index % OMOK_BOARD_SIZE + 1) | ||
|
||
private fun indexsToPoints(indexs: List<Int>): Points = | ||
Points(indexs.map { calculateIndexToPoint(it) }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package woowacourse.omok.db | ||
|
||
import android.provider.BaseColumns | ||
|
||
object OmokConstract : BaseColumns { | ||
const val TABLE_NAME = "game_info" | ||
const val TABLE_COLUMN_POSITION = "position" | ||
const val TABLE_COLUMN_COLOR = "color" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package woowacourse.omok.db | ||
|
||
import android.content.ContentValues | ||
import android.content.Context | ||
import android.database.sqlite.SQLiteDatabase | ||
import android.database.sqlite.SQLiteOpenHelper | ||
|
||
class OmokDBHelper(context: Context?) : SQLiteOpenHelper(context, DATABASE_NAME, null, 1) { | ||
private val db = writableDatabase | ||
override fun onCreate(db: SQLiteDatabase?) { | ||
db?.execSQL( | ||
"CREATE TABLE ${OmokConstract.TABLE_NAME} (" + | ||
" ${OmokConstract.TABLE_COLUMN_POSITION} int not null," + | ||
" ${OmokConstract.TABLE_COLUMN_COLOR} varchar(50) not null" + | ||
");" | ||
) | ||
} | ||
|
||
override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) { | ||
db?.execSQL("DROP TABLE IF EXISTS ${OmokConstract.TABLE_NAME}") | ||
onCreate(db) | ||
} | ||
|
||
fun getIndexsByColor(color: String): List<Int> { | ||
val indexs = mutableListOf<Int>() | ||
if (!db.isOpen) throw IllegalAccessException() | ||
val cursor = db.query( | ||
OmokConstract.TABLE_NAME, | ||
arrayOf(OmokConstract.TABLE_COLUMN_POSITION), | ||
"${OmokConstract.TABLE_COLUMN_COLOR} = ?", | ||
arrayOf(color), | ||
null, | ||
null, | ||
null | ||
) | ||
|
||
while (cursor.moveToNext()) indexs.add(cursor.getInt(0)) | ||
return indexs.toList() | ||
} | ||
|
||
fun insert(index: Int, color: String) { | ||
if (!db.isOpen) throw IllegalAccessException() | ||
db.insert(OmokConstract.TABLE_NAME, null, values(index, color)) | ||
} | ||
|
||
private fun values(position: Int, color: String): ContentValues { | ||
val values = ContentValues() | ||
values.put(OmokConstract.TABLE_COLUMN_POSITION, position) | ||
values.put(OmokConstract.TABLE_COLUMN_COLOR, color) | ||
return values | ||
} | ||
|
||
fun deleteAll() { | ||
db.execSQL("DELETE FROM ${OmokConstract.TABLE_NAME}") | ||
} | ||
|
||
companion object { | ||
private val DATABASE_NAME = "omok" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<vector xmlns:android="http:https://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http:https://schemas.android.com/aapt" | ||
android:width="108dp" | ||
android:height="108dp" | ||
android:viewportWidth="108" | ||
android:viewportHeight="108"> | ||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> | ||
<aapt:attr name="android:fillColor"> | ||
<gradient | ||
android:endX="85.84757" | ||
android:endY="92.4963" | ||
android:startX="42.9492" | ||
android:startY="49.59793" | ||
android:type="linear"> | ||
<item | ||
android:color="#44000000" | ||
android:offset="0.0" /> | ||
<item | ||
android:color="#00000000" | ||
android:offset="1.0" /> | ||
</gradient> | ||
</aapt:attr> | ||
</path> | ||
<path | ||
android:fillColor="#FFFFFF" | ||
android:fillType="nonZero" | ||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" | ||
android:strokeWidth="1" | ||
android:strokeColor="#00000000" /> | ||
</vector> |
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실제 게임을 진행하는 로직도 onCreate()에서 같이 분리 해보면 좋을 것 같아요!
더 고도화로 간다면 리스너에서 외부의 상태를 변경하는 형태라면 인터페이스를 구현해서 상태를 내부로 캡슐화 시키는 방법도 있습니다
아래는 반영하실 필요는 없고 참고만 해주세요.