-
Notifications
You must be signed in to change notification settings - Fork 47
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
Showing
20 changed files
with
495 additions
and
68 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
2 changes: 1 addition & 1 deletion
2
iOS/baseballApp/baseballApp/Assets.xcassets/baseball_player.imageset/Contents.json
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
Binary file added
BIN
+674 Bytes
...lApp/baseballApp/Assets.xcassets/baseball_player.imageset/baseball_player-2.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 removed
BIN
-867 Bytes
...allApp/baseballApp/Assets.xcassets/baseball_player.imageset/baseball_player.png
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,12 @@ | ||
// | ||
// Constant.swift | ||
// baseballApp | ||
// | ||
// Created by 김지선 on 2021/05/13. | ||
// | ||
|
||
import Foundation | ||
|
||
struct Notification { | ||
static let sendGame = "sendGame" | ||
} |
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
29 changes: 29 additions & 0 deletions
29
iOS/baseballApp/baseballApp/Data/Network/DataMapping/PlayDTO.swift
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,29 @@ | ||
import Foundation | ||
|
||
struct PlayDTO: Codable { | ||
let inningID: Int | ||
let inning: Int | ||
let attackTeamID: Int | ||
let ballCount: [String] | ||
let outCount: Int | ||
let pitcher: Player | ||
let batter: Player | ||
let baseStatus: [Int] | ||
let homeTeamScore: Int | ||
let awayTeamScore: Int | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case inningID = "inning_id" | ||
case inning = "inning" | ||
case attackTeamID = "attack_team_id" | ||
case ballCount = "ball_count" | ||
case outCount = "out_count" | ||
case pitcher = "pitcher" | ||
case batter = "batter" | ||
case baseStatus = "base_status" | ||
case homeTeamScore = "home_team_score" | ||
case awayTeamScore = "away_team_score" | ||
} | ||
} | ||
|
||
|
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,17 @@ | ||
import Foundation | ||
|
||
class BallCount { | ||
private var strike: Int | ||
private var ball: Int | ||
|
||
init() { | ||
self.strike = 0 | ||
self.ball = 0 | ||
} | ||
|
||
func addBall(_ ballType: String) -> (Int, Int) { | ||
strike += ballType == "S" ? 1 : 0 | ||
ball += ballType == "B" ? 1: 0 | ||
return (strike, ball) | ||
} | ||
} |
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,2 @@ | ||
import Foundation | ||
|
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,7 +1,6 @@ | ||
import Foundation | ||
|
||
struct Player { | ||
struct Player: Codable { | ||
let name: String | ||
let backNumber: Int | ||
let record: Record | ||
} |
Oops, something went wrong.