-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b6b391
commit d8e4a77
Showing
10 changed files
with
250 additions
and
32 deletions.
There are no files selected for viewing
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
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,41 @@ | ||
// | ||
// LOLMatchEntity.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct LOLMatchEntity: Hashable { | ||
let matchId: String | ||
let matchType: LOLGameType | ||
let championName: String | ||
let doubleKills: Int | ||
let firstBloodKill: Bool | ||
let teamPosition: LOLPosition | ||
let pentaKills: Int | ||
let assists: Int | ||
let deaths: Int | ||
let kills: Int | ||
let kda: Double | ||
let firstBloodAssist: Bool | ||
let firstTowerAssist: Bool | ||
let firstTowerKill: Bool | ||
let goldPerMinute: Int | ||
let gameEndedInEarlySurrender: Bool | ||
let gameEndedInSurrender: Bool | ||
let timePlayed: Int | ||
let totalMinionsKilled: Int | ||
let win: Bool | ||
let soloKills: Int | ||
let legendaryCount: Int | ||
let damagePerMinute: Int | ||
let dragonTakedowns: Int | ||
let epicMonsterSteals: Int | ||
let baronTakedowns: Int | ||
let voidMonsterKill: Int | ||
let perfectDragonSoulsTaken: Int | ||
let elderDragonMultikills: Int | ||
let killParticipation: Int | ||
} |
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
This file was deleted.
Oops, something went wrong.
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,128 @@ | ||
// | ||
// MatchCardView.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
public struct MatchCardView: View { | ||
|
||
let matchData: LOLMatchEntity | ||
|
||
public init(matchData: LOLMatchEntity) { | ||
self.matchData = matchData | ||
} | ||
|
||
public var body: some View { | ||
HStack(spacing: 0) { | ||
Rectangle() | ||
.fill(matchData.win ? .blue : .errorRed) | ||
.frame(width: 8) | ||
.padding(.trailing, 10) | ||
|
||
VStack(alignment: .leading, spacing: 0) { | ||
Text(matchData.matchType.korName) | ||
.glFont(.body2Bold) | ||
.foregroundStyle(matchData.win ? .blue : .errorRed) | ||
.padding(.bottom, 2) | ||
|
||
Text(matchData.win ? "승리" : "패배") | ||
.glFont(.body2) | ||
.foregroundStyle(.glGray2) | ||
|
||
Spacer() | ||
} | ||
.padding(.vertical, 10) | ||
|
||
Spacer() | ||
|
||
if let positionImage = matchData.teamPosition.positionImage { | ||
Image(uiImage: positionImage) | ||
.resizable() | ||
.frame(width: 50, height: 50) | ||
} | ||
} | ||
.padding(.trailing, 14) | ||
.frame(height: 100) | ||
.background( | ||
matchData.win ? .winBlue : .glLooseRed | ||
) | ||
.clipShape(.rect(cornerRadius: 8)) | ||
} | ||
} | ||
|
||
#Preview { | ||
VStack { | ||
MatchCardView( | ||
matchData: LOLMatchEntity( | ||
matchId: "string", | ||
matchType: .freeRank, | ||
championName: "아트록스", | ||
doubleKills: 1, | ||
firstBloodKill: true, | ||
teamPosition: .mid, | ||
pentaKills: 0, | ||
assists: 5, | ||
deaths: 3, | ||
kills: 5, | ||
kda: 3.3, | ||
firstBloodAssist: true, | ||
firstTowerAssist: true, | ||
firstTowerKill: true, | ||
goldPerMinute: 300, | ||
gameEndedInEarlySurrender: true, | ||
gameEndedInSurrender: true, | ||
timePlayed: 0, | ||
totalMinionsKilled: 0, | ||
win: true, | ||
soloKills: 0, | ||
legendaryCount: 0, | ||
damagePerMinute: 0, | ||
dragonTakedowns: 0, | ||
epicMonsterSteals: 0, | ||
baronTakedowns: 0, | ||
voidMonsterKill: 0, | ||
perfectDragonSoulsTaken: 0, | ||
elderDragonMultikills: 0, | ||
killParticipation: 0 | ||
) | ||
) | ||
MatchCardView( | ||
matchData: LOLMatchEntity( | ||
matchId: "string", | ||
matchType: .freeRank, | ||
championName: "아트록스", | ||
doubleKills: 1, | ||
firstBloodKill: true, | ||
teamPosition: .top, | ||
pentaKills: 0, | ||
assists: 5, | ||
deaths: 3, | ||
kills: 5, | ||
kda: 3.3, | ||
firstBloodAssist: true, | ||
firstTowerAssist: true, | ||
firstTowerKill: true, | ||
goldPerMinute: 300, | ||
gameEndedInEarlySurrender: true, | ||
gameEndedInSurrender: true, | ||
timePlayed: 0, | ||
totalMinionsKilled: 0, | ||
win: false, | ||
soloKills: 0, | ||
legendaryCount: 0, | ||
damagePerMinute: 0, | ||
dragonTakedowns: 0, | ||
epicMonsterSteals: 0, | ||
baronTakedowns: 0, | ||
voidMonsterKill: 0, | ||
perfectDragonSoulsTaken: 0, | ||
elderDragonMultikills: 0, | ||
killParticipation: 0 | ||
) | ||
) | ||
} | ||
.padding() | ||
} |
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
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,18 @@ | ||
// | ||
// UserMatchListView.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct UserMatchListView: View { | ||
var body: some View { | ||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) | ||
} | ||
} | ||
|
||
#Preview { | ||
UserMatchListView() | ||
} |
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
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,41 @@ | ||
// | ||
// LOLMatchDTO.swift | ||
// GameLink-iOS | ||
// | ||
// Created by 정도현 on 11/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct LOLMatchDTO: Codable, Hashable { | ||
let matchId: String | ||
let matchType: String | ||
let championName: String | ||
let doubleKills: Int | ||
let firstBloodKill: Bool | ||
let teamPosition: String | ||
let pentaKills: Int | ||
let assists: Int | ||
let deaths: Int | ||
let kills: Int | ||
let kda: Double | ||
let firstBloodAssist: Bool | ||
let firstTowerAssist: Bool | ||
let firstTowerKill: Bool | ||
let goldPerMinute: Int | ||
let gameEndedInEarlySurrender: Bool | ||
let gameEndedInSurrender: Bool | ||
let timePlayed: Int | ||
let totalMinionsKilled: Int | ||
let win: Bool | ||
let soloKills: Int | ||
let legendaryCount: Int | ||
let damagePerMinute: Int | ||
let dragonTakedowns: Int | ||
let epicMonsterSteals: Int | ||
let baronTakedowns: Int | ||
let voidMonsterKill: Int | ||
let perfectDragonSoulsTaken: Int | ||
let elderDragonMultikills: Int | ||
let killParticipation: Int | ||
} |
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