Skip to content

Commit

Permalink
fix: develop 충돌 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
choijungp committed Nov 28, 2024
2 parents ef0cb47 + b5a59cf commit 9f1031e
Show file tree
Hide file tree
Showing 16 changed files with 669 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public protocol WhiteboardRepositoryInterface {

/// 화이트보드 탐색을 중단 후 다시 시작합니다.
func restartSearching()

/// 화이트보드와 연결을 끊습니다.
func disconnectWhiteboard()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public protocol WhiteboardUseCaseInterface {

/// 주변 화이트보드를 탐색합니다.
func startSearchingWhiteboard()

/// 화이트보드와 연결을 끊습니다.
func disconnectWhiteboard()

Expand All @@ -28,7 +28,7 @@ public protocol WhiteboardUseCaseInterface {

/// 화이트보드 탐색을 중지합니다.
func stopSearchingWhiteboard()

/// 화이트보드 탐색을 중단 후 다시 시작합니다.
func refreshWhiteboardList()
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public protocol WhiteboardObjectSetInterface {
/// 집합에 있는 오브젝트를 업데이트 합니다.
/// - Parameter object: 업데이트할 오브젝트
func update(object: WhiteboardObject) async

/// ID로 집합에있는 오브젝트를 가져옵니다.
/// - Parameter id: 가져올 오브젝트의 ID
/// - Returns: 오브젝트
Expand Down
90 changes: 81 additions & 9 deletions Presentation/Presentation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
6F199EF12CE31A05005DC40F /* WhiteboardToolBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F199EF02CE31A05005DC40F /* WhiteboardToolBar.swift */; };
6F199EF32CE3203A005DC40F /* WhiteboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F199EF22CE3203A005DC40F /* WhiteboardViewController.swift */; };
6F21477D2CE4EFCF00B55E2C /* TextObjectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F21477C2CE4EFCF00B55E2C /* TextObjectView.swift */; };
A81E7ABB2CF5C771007E8414 /* Wordle.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7ABA2CF5C771007E8414 /* Wordle.swift */; };
A81E7ABD2CF5C7A7007E8414 /* WordleState.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7ABC2CF5C7A7007E8414 /* WordleState.swift */; };
A81E7ABF2CF5C7FE007E8414 /* KeyboardState.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7ABE2CF5C7FE007E8414 /* KeyboardState.swift */; };
A81E7AC12CF5C813007E8414 /* WordleKeyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7AC02CF5C813007E8414 /* WordleKeyboard.swift */; };
A81E7AC62CF5CA18007E8414 /* WordleTileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7AC52CF5CA18007E8414 /* WordleTileView.swift */; };
A81E7AC82CF5CAD5007E8414 /* KeyboardTileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7AC72CF5CAD5007E8414 /* KeyboardTileView.swift */; };
A81E7BD42CF6E76D007E8414 /* WordleGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7BD32CF6E76D007E8414 /* WordleGuideView.swift */; };
A81E7BD62CF6E797007E8414 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A81E7BD52CF6E797007E8414 /* Images.xcassets */; };
A81E7BD82CF6E94F007E8414 /* WordleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7BD72CF6E94F007E8414 /* WordleView.swift */; };
A81E7BDB2CF6E973007E8414 /* WordleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81E7BDA2CF6E973007E8414 /* WordleViewModel.swift */; };
6F25BE442CF5BC44005BCAA2 /* PeerMessageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F25BE432CF5BC44005BCAA2 /* PeerMessageCell.swift */; };
6F25BE472CF5BF79005BCAA2 /* ChatMessageCellModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F25BE462CF5BF6F005BCAA2 /* ChatMessageCellModel.swift */; };
6FA7DBE92CF4B4E1007333C6 /* ChatTextFieldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FA7DBE82CF4B4E1007333C6 /* ChatTextFieldView.swift */; };
Expand Down Expand Up @@ -77,6 +87,16 @@
6F199EF02CE31A05005DC40F /* WhiteboardToolBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhiteboardToolBar.swift; sourceTree = "<group>"; };
6F199EF22CE3203A005DC40F /* WhiteboardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhiteboardViewController.swift; sourceTree = "<group>"; };
6F21477C2CE4EFCF00B55E2C /* TextObjectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextObjectView.swift; sourceTree = "<group>"; };
A81E7ABA2CF5C771007E8414 /* Wordle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Wordle.swift; sourceTree = "<group>"; };
A81E7ABC2CF5C7A7007E8414 /* WordleState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordleState.swift; sourceTree = "<group>"; };
A81E7ABE2CF5C7FE007E8414 /* KeyboardState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardState.swift; sourceTree = "<group>"; };
A81E7AC02CF5C813007E8414 /* WordleKeyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordleKeyboard.swift; sourceTree = "<group>"; };
A81E7AC52CF5CA18007E8414 /* WordleTileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordleTileView.swift; sourceTree = "<group>"; };
A81E7AC72CF5CAD5007E8414 /* KeyboardTileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardTileView.swift; sourceTree = "<group>"; };
A81E7BD32CF6E76D007E8414 /* WordleGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordleGuideView.swift; sourceTree = "<group>"; };
A81E7BD52CF6E797007E8414 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
A81E7BD72CF6E94F007E8414 /* WordleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordleView.swift; sourceTree = "<group>"; };
A81E7BDA2CF6E973007E8414 /* WordleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordleViewModel.swift; sourceTree = "<group>"; };
6F25BE432CF5BC44005BCAA2 /* PeerMessageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeerMessageCell.swift; sourceTree = "<group>"; };
6F25BE462CF5BF6F005BCAA2 /* ChatMessageCellModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMessageCellModel.swift; sourceTree = "<group>"; };
6FA7DBE82CF4B4E1007333C6 /* ChatTextFieldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatTextFieldView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -138,6 +158,7 @@
A85260262CE344AF0089DA5E /* Profile */,
5B65412E2CE32B11000168AD /* WhiteboardList */,
0080E8C32CE2F0310095B958 /* Whiteboard */,
A81E7AB42CF5C6D4007E8414 /* Wordle */,
6FA7DBE52CF4682F007333C6 /* Chat */,
);
path = Sources;
Expand Down Expand Up @@ -242,32 +263,64 @@
name = Frameworks;
sourceTree = "<group>";
};
6F25BE452CF5BF63005BCAA2 /* Model */ = {
A81E7AB42CF5C6D4007E8414 /* Wordle */ = {
isa = PBXGroup;
children = (
6F25BE462CF5BF6F005BCAA2 /* ChatMessageCellModel.swift */,
A81E7AB92CF5C762007E8414 /* Model */,
A81E7AC42CF5CA07007E8414 /* View */,
A81E7BD92CF6E95C007E8414 /* ViewModel */,
);
path = Wordle;
sourceTree = "<group>";
};
A81E7AB92CF5C762007E8414 /* Model */ = {
isa = PBXGroup;
children = (
A81E7ABC2CF5C7A7007E8414 /* WordleState.swift */,
A81E7ABA2CF5C771007E8414 /* Wordle.swift */,
A81E7ABE2CF5C7FE007E8414 /* KeyboardState.swift */,
A81E7AC02CF5C813007E8414 /* WordleKeyboard.swift */,
);
path = Model;
sourceTree = "<group>";
};
6FA7DBE52CF4682F007333C6 /* Chat */ = {
A81E7AC42CF5CA07007E8414 /* View */ = {
isa = PBXGroup;
children = (
6F25BE452CF5BF63005BCAA2 /* Model */,
6FA7DBE72CF4B4DA007333C6 /* View */,
6FA7DBE62CF4685A007333C6 /* ViewModel */,
A81E7AC52CF5CA18007E8414 /* WordleTileView.swift */,
A81E7AC72CF5CAD5007E8414 /* KeyboardTileView.swift */,
A81E7BD32CF6E76D007E8414 /* WordleGuideView.swift */,
A81E7BD72CF6E94F007E8414 /* WordleView.swift */,
);
path = Chat;
path = View;
sourceTree = "<group>";
};
6FA7DBE62CF4685A007333C6 /* ViewModel */ = {
A81E7BD92CF6E95C007E8414 /* ViewModel */ = {
isa = PBXGroup;
children = (
6FA7DBEB2CF56103007333C6 /* ChatViewModel.swift */,
A81E7BDA2CF6E973007E8414 /* WordleViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
6FA7DBE52CF4682F007333C6 /* Chat */ = {
isa = PBXGroup;
children = (
6F25BE452CF5BF63005BCAA2 /* Model */,
6FA7DBE72CF4B4DA007333C6 /* View */,
6FA7DBE62CF4685A007333C6 /* ViewModel */,
);
path = Chat;
sourceTree = "<group>";
};
6FA7DBE62CF4685A007333C6 /* ViewModel */ = {
isa = PBXGroup;
children = (
6FA7DBEB2CF56103007333C6 /* ChatViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
6FA7DBE72CF4B4DA007333C6 /* View */ = {
isa = PBXGroup;
children = (
Expand All @@ -288,10 +341,19 @@
path = Cell;
sourceTree = "<group>";
};
6F25BE452CF5BF63005BCAA2 /* Model */ = {
isa = PBXGroup;
children = (
6F25BE462CF5BF6F005BCAA2 /* ChatMessageCellModel.swift */,
);
path = Model;
sourceTree = "<group>";
};
A8525DC12CE200110089DA5E /* Resources */ = {
isa = PBXGroup;
children = (
A8525DC22CE200230089DA5E /* Colors.xcassets */,
A81E7BD52CF6E797007E8414 /* Images.xcassets */,
);
path = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -427,6 +489,7 @@
buildActionMask = 2147483647;
files = (
A8525DC32CE200230089DA5E /* Colors.xcassets in Resources */,
A81E7BD62CF6E797007E8414 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -458,12 +521,17 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A81E7ABB2CF5C771007E8414 /* Wordle.swift in Sources */,
00CCC2672CE60BCD005FA747 /* AirplainFont.swift in Sources */,
A81E7AC12CF5C813007E8414 /* WordleKeyboard.swift in Sources */,
5BE0D1BC2CEC7D2300F43946 /* WhiteboardCell.swift in Sources */,
A8E97AC12CE4E9A300B28063 /* ProfileIconCollectionViewCell.swift in Sources */,
A8E979C72CE4945500B28063 /* LayoutConstant.swift in Sources */,
A85260292CE344C60089DA5E /* ProfileIconView.swift in Sources */,
A81E7AC82CF5CAD5007E8414 /* KeyboardTileView.swift in Sources */,
004B21812CEB5BC000A5BEB8 /* PhotoObjectView.swift in Sources */,
A81E7BDB2CF6E973007E8414 /* WordleViewModel.swift in Sources */,
A81E7ABD2CF5C7A7007E8414 /* WordleState.swift in Sources */,
6FA7DBE92CF4B4E1007333C6 /* ChatTextFieldView.swift in Sources */,
A8E97ABF2CE4E94D00B28063 /* SelectProfileIconViewController.swift in Sources */,
A8E979C52CE493E900B28063 /* ProfileViewController.swift in Sources */,
Expand All @@ -472,12 +540,15 @@
A85260252CE3447E0089DA5E /* UIColor+.swift in Sources */,
00D2DD982CE8CD300089F0BA /* DrawingView.swift in Sources */,
A81E7BF52CF710EC007E8414 /* GameObjectView.swift in Sources */,
A81E7AC62CF5CA18007E8414 /* WordleTileView.swift in Sources */,
A8E979CA2CE49A1800B28063 /* ProfileViewModel.swift in Sources */,
0080E8C62CE2F0510095B958 /* WhiteboardObjectView.swift in Sources */,
6FA7DBEC2CF56103007333C6 /* ChatViewModel.swift in Sources */,
A8525DCB2CE203D50089DA5E /* UIView+.swift in Sources */,
6F199EF32CE3203A005DC40F /* WhiteboardViewController.swift in Sources */,
A81E7ABF2CF5C7FE007E8414 /* KeyboardState.swift in Sources */,
6F199EF12CE31A05005DC40F /* WhiteboardToolBar.swift in Sources */,
A81E7BD82CF6E94F007E8414 /* WordleView.swift in Sources */,
6FA7DBEE2CF56457007333C6 /* MessageCell.swift in Sources */,
6F21477D2CE4EFCF00B55E2C /* TextObjectView.swift in Sources */,
6F25BE442CF5BC44005BCAA2 /* PeerMessageCell.swift in Sources */,
Expand All @@ -487,6 +558,7 @@
5B2BC78E2CE4F66F00893B9E /* WhiteboardListViewController.swift in Sources */,
5B2BC78F2CE4F66F00893B9E /* WhiteboardListViewModel.swift in Sources */,
0080E8CA2CE2FF750095B958 /* WhiteboardObjectViewFactoryable.swift in Sources */,
A81E7BD42CF6E76D007E8414 /* WordleGuideView.swift in Sources */,
00683D762CE4B828000D28E4 /* DrawingRenderer.swift in Sources */,
6F25BE472CF5BF79005BCAA2 /* ChatMessageCellModel.swift in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "WordleGuideImage.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Presentation/Presentation/Sources/Wordle/Model/KeyboardState.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// KeyboardState.swift
// Presentation
//
// Created by 최정인 on 11/26/24.
//

enum KeyboardState {
case unused
case wrong
case correct
case misplaced
case enter
case erase
}
11 changes: 11 additions & 0 deletions Presentation/Presentation/Sources/Wordle/Model/Wordle.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Wordle.swift
// Presentation
//
// Created by 최정인 on 11/26/24.
//

struct Wordle {
var alphabet: String?
var state: WordleState
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// WordleKeyboard.swift
// Presentation
//
// Created by 최정인 on 11/26/24.
//

struct WordleKeyboard {
let alphabet: String?
var keyboardState: KeyboardState
}
15 changes: 15 additions & 0 deletions Presentation/Presentation/Sources/Wordle/Model/WordleState.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// WordleState.swift
// Presentation
//
// Created by 최정인 on 11/26/24.
//

enum WordleState {
case empty
case typing
case wrong
case correct
case invalid
case misplaced
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//
// KeyboardTileView.swift
// Presentation
//
// Created by 최정인 on 11/26/24.
//

import SwiftUI

struct KeyboardTileView: View {
@Binding var wordleKeyboard: WordleKeyboard
let keyboardWidth: CGFloat
let keyboardHeight: CGFloat
let action: () -> Void

private enum KeyboardTileViewLayoutConstant {
static let keyboardCornerRadius: CGFloat = 10
static let enterFontSize: CGFloat = 13
}

// 타일 색상
private var keywordColor: Color {
switch wordleKeyboard.keyboardState {
case .unused, .enter, .erase:
.gray200
case .wrong:
.gray600
case .correct:
.airplainBlue
case .misplaced:
.wordleYellow
}
}

// Text 색상
private var keyboardTextColor: Color {
switch wordleKeyboard.keyboardState {
case .unused, .enter, .erase:
.airplainBlack
default:
.white
}
}

var body: some View {
Button(action: action) {
ZStack {
RoundedRectangle(cornerRadius: KeyboardTileViewLayoutConstant.keyboardCornerRadius)
.fill(keywordColor)
.frame(width: keyboardWidth, height: keyboardHeight)

if let alphabet = wordleKeyboard.alphabet {
Text(alphabet)
.font(Font(AirplainFont.Heading3))
.foregroundStyle(keyboardTextColor)
} else if wordleKeyboard.keyboardState == .erase {
Text("")
.font(Font(AirplainFont.Heading3))
.foregroundStyle(keyboardTextColor)
} else if wordleKeyboard.keyboardState == .enter {
Text("ENTER")
.font(.system(size: KeyboardTileViewLayoutConstant.enterFontSize, weight: .bold))
.foregroundStyle(keyboardTextColor)
}
}
}
}
}
Loading

0 comments on commit 9f1031e

Please sign in to comment.