-
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.
Merge pull request #10 from Polynomeer/feature/6/game-view
Feature/6/game view
- Loading branch information
Showing
46 changed files
with
632 additions
and
42 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,20 @@ | ||
import GameHeader from "./GameHeader/GameHeader"; | ||
import GamePlayground from "./GamePlayground/GamePlayground"; | ||
import GamePlayLog from "./GamePlayLog/GamePlayLog"; | ||
import { Game as S } from "@/Components/Game/GameStyles"; | ||
|
||
const Game = () => { | ||
return ( | ||
<S.Game> | ||
<S.GameLeftSection> | ||
<GameHeader /> | ||
<GamePlayground /> | ||
</S.GameLeftSection> | ||
<S.GameRightSection> | ||
<GamePlayLog /> | ||
</S.GameRightSection> | ||
</S.Game> | ||
); | ||
}; | ||
|
||
export { Game }; |
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,14 @@ | ||
import GameTitle from "./GameTitle"; | ||
import GameProgress from "./GameProgress/GameProgress"; | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GameHeader = () => { | ||
return ( | ||
<S.GameHeader> | ||
<GameTitle /> | ||
<GameProgress /> | ||
</S.GameHeader> | ||
); | ||
}; | ||
|
||
export default GameHeader; |
9 changes: 9 additions & 0 deletions
9
FE/baseball/src/Components/Game/GameHeader/GameProgress/CurrentPlayerTag.jsx
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 @@ | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const CurrentPlayerTag = () => { | ||
return ( | ||
<S.GameProgress.CurrentPlayerTag>Player</S.GameProgress.CurrentPlayerTag> | ||
); | ||
}; | ||
|
||
export default CurrentPlayerTag; |
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 @@ | ||
import Score from "./Score"; | ||
import TeamName from "./TeamName"; | ||
import VS from "./VS"; | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GameProgress = () => { | ||
return ( | ||
<S.GameProgress.GameProgress> | ||
<TeamName teamName={"Swing"} isCurrentPlayer={true} /> | ||
<Score score={1} /> | ||
<VS /> | ||
<Score score={5} /> | ||
<TeamName teamName={"Raccoon"} isCurrentPlayer={false} /> | ||
</S.GameProgress.GameProgress> | ||
); | ||
}; | ||
|
||
export default GameProgress; |
Empty file.
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,7 @@ | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const Score = ({ score }) => { | ||
return <S.GameProgress.Score>{score}</S.GameProgress.Score>; | ||
}; | ||
|
||
export default 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,13 @@ | ||
import CurrentPlayerTag from "./CurrentPlayerTag"; | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const TeamName = ({ teamName, isCurrentPlayer }) => { | ||
return ( | ||
<S.GameProgress.TeamNameWrapper> | ||
<S.GameProgress.TeamName>{teamName}</S.GameProgress.TeamName> | ||
{isCurrentPlayer ? <CurrentPlayerTag /> : null} | ||
</S.GameProgress.TeamNameWrapper> | ||
); | ||
}; | ||
|
||
export default TeamName; |
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,7 @@ | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const VS = () => { | ||
return <S.GameProgress.VS>VS</S.GameProgress.VS>; | ||
}; | ||
|
||
export default VS; |
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,7 @@ | ||
import { GameHeader as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GameTitle = () => { | ||
return <S.GameTitle>Team illy'swing BASEBALL</S.GameTitle>; | ||
}; | ||
|
||
export default GameTitle; |
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,14 @@ | ||
import PlayerBox from "./PlayerBox"; | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const CurrentPlayer = ({ currentPlayer }) => { | ||
return ( | ||
<S.CurrentPlayer.CurrentPlayer> | ||
{/* playerBox에는 선수이름,포지션,투구갯수 or 타석/안타 정보가 props로 내려질 예정입니다.*/} | ||
<PlayerBox /> | ||
<PlayerBox /> | ||
</S.CurrentPlayer.CurrentPlayer> | ||
); | ||
}; | ||
|
||
export default CurrentPlayer; |
15 changes: 15 additions & 0 deletions
15
FE/baseball/src/Components/Game/GamePlayLog/CurrentPlayer/PlayerBox.jsx
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,15 @@ | ||
import Position from "./Position"; | ||
import PlayerName from "./PlayerName"; | ||
import PlayerDescription from "./PlayerDescription"; | ||
|
||
const PlayerBox = () => { | ||
return ( | ||
<div> | ||
<Position /> | ||
<PlayerName /> | ||
<PlayerDescription /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PlayerBox; |
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 @@ | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const PlayerDescription = ({ playerDescription }) => { | ||
return ( | ||
<S.CurrentPlayer.PlayerDescription>#38</S.CurrentPlayer.PlayerDescription> | ||
); | ||
}; | ||
|
||
export default PlayerDescription; |
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,7 @@ | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const PlayerName = ({ playerName }) => { | ||
return <S.CurrentPlayer.PlayerName>최동원</S.CurrentPlayer.PlayerName>; | ||
}; | ||
|
||
export default PlayerName; |
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,7 @@ | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const Position = ({ position }) => { | ||
return <S.CurrentPlayer.Position>투수</S.CurrentPlayer.Position>; | ||
}; | ||
|
||
export default Position; |
14 changes: 14 additions & 0 deletions
14
FE/baseball/src/Components/Game/GamePlayLog/GamePlayLog.jsx
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,14 @@ | ||
import CurrentPlayer from "./CurrentPlayer/CurrentPlayer"; | ||
import PlayerLog from "./PlayerLog/PlayerLog"; | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GamePlayLog = () => { | ||
return ( | ||
<S.GamePlayLog> | ||
<CurrentPlayer /> | ||
<PlayerLog /> | ||
</S.GamePlayLog> | ||
); | ||
}; | ||
|
||
export default GamePlayLog; |
16 changes: 16 additions & 0 deletions
16
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/Log.jsx
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,16 @@ | ||
import LogRow from "./LogRow/LogRow"; | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const Log = () => { | ||
return ( | ||
<S.PlayerLog.Log> | ||
<LogRow /> | ||
<LogRow /> | ||
<LogRow /> | ||
<LogRow /> | ||
<LogRow /> | ||
</S.PlayerLog.Log> | ||
); | ||
}; | ||
|
||
export default Log; |
13 changes: 13 additions & 0 deletions
13
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/LogBox.jsx
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,13 @@ | ||
import LogTitle from "./LogTitle"; | ||
import Log from "./Log"; | ||
|
||
const LogBox = () => { | ||
return ( | ||
<> | ||
<LogTitle /> | ||
<Log /> | ||
</> | ||
); | ||
}; | ||
|
||
export default LogBox; |
16 changes: 16 additions & 0 deletions
16
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/LogRow/LogRow.jsx
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,16 @@ | ||
import LogRowNumber from "./LogRowNumber"; | ||
import LogRowAction from "./LogRowAction"; | ||
import LogRowBallCount from "./LogRowBallCount"; | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const Log = () => { | ||
return ( | ||
<S.PlayerLog.LogRow> | ||
<LogRowNumber /> | ||
<LogRowAction /> | ||
<LogRowBallCount /> | ||
</S.PlayerLog.LogRow> | ||
); | ||
}; | ||
|
||
export default Log; |
17 changes: 17 additions & 0 deletions
17
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/LogRow/LogRowAction.jsx
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 { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const LogRowAction = ({ action }) => { | ||
// let isEndAction; | ||
// if (action === "안타" || action === "아웃" || action === "홈런") { | ||
// isEndAction = true; | ||
// } else { | ||
// isEndAction = false; | ||
// } | ||
return ( | ||
<S.PlayerLog.LogRowAction isEndAction={true}> | ||
스트라이크 | ||
</S.PlayerLog.LogRowAction> | ||
); | ||
}; | ||
|
||
export default LogRowAction; |
7 changes: 7 additions & 0 deletions
7
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/LogRow/LogRowBallCount.jsx
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,7 @@ | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const LogRowBallCount = ({ ballCount }) => { | ||
return <S.PlayerLog.LogRowBallCount>S1 B2</S.PlayerLog.LogRowBallCount>; | ||
}; | ||
|
||
export default LogRowBallCount; |
7 changes: 7 additions & 0 deletions
7
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/LogRow/LogRowNumber.jsx
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,7 @@ | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const LogRowNumber = ({ logNumber }) => { | ||
return <S.PlayerLog.LogRowNumber>1</S.PlayerLog.LogRowNumber>; | ||
}; | ||
|
||
export default LogRowNumber; |
11 changes: 11 additions & 0 deletions
11
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/LogTitle.jsx
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,11 @@ | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const LogTitle = ({ isCurrentPlayer }) => { | ||
return ( | ||
<S.PlayerLog.LogTitle isCurrentPlayer={true}> | ||
4번 타자 이준석 | ||
</S.PlayerLog.LogTitle> | ||
); | ||
}; | ||
|
||
export default LogTitle; |
15 changes: 15 additions & 0 deletions
15
FE/baseball/src/Components/Game/GamePlayLog/PlayerLog/PlayerLog.jsx
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,15 @@ | ||
import LogBox from "./LogBox"; | ||
import { GamePlayLog as S } from "@/Components/Game/GameStyles"; | ||
|
||
const PlayerLog = () => { | ||
return ( | ||
<S.PlayerLog.PlayerLog> | ||
<LogBox /> | ||
<LogBox /> | ||
<LogBox /> | ||
<LogBox /> | ||
</S.PlayerLog.PlayerLog> | ||
); | ||
}; | ||
|
||
export default PlayerLog; |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file removed
0
FE/baseball/src/Components/Game/GamePlayLog/PlayerLogBox/PlayerLog/LogBox/LogBox.jsx
Empty file.
Empty file removed
0
FE/baseball/src/Components/Game/GamePlayLog/PlayerLogBox/PlayerLog/LogTitle.jsx
Empty file.
Empty file removed
0
FE/baseball/src/Components/Game/GamePlayLog/PlayerLogBox/PlayerLog/PlayerLog.jsx
Empty file.
Empty file.
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,7 @@ | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const BallCount = ({ type }) => { | ||
return <S.BallCountBoard.BallCount type={type} />; | ||
}; | ||
|
||
export default BallCount; |
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,28 @@ | ||
import BallJudgement from "./BallJudgement"; | ||
import BallCount from "./BallCount"; | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
import * as CS from "@/Styles/CommonStyles"; | ||
|
||
const BallCountBoard = () => { | ||
// 나중엔 ballcountrow쯤으로 관리하고 type이랑 count props를 내려주는 방향으로 리펙토링 | ||
return ( | ||
<S.BallCountBoard.BallCountBoard> | ||
<CS.BOX.FLEX_ROW_CENTER_BOX> | ||
<BallJudgement type={"S"} /> | ||
<BallCount type={"STRIKE"} /> | ||
<BallCount type={"STRIKE"} /> | ||
</CS.BOX.FLEX_ROW_CENTER_BOX> | ||
<CS.BOX.FLEX_ROW_CENTER_BOX> | ||
<BallJudgement type={"B"} /> | ||
<BallCount type={"BALL"} /> | ||
<BallCount type={"BALL"} /> | ||
</CS.BOX.FLEX_ROW_CENTER_BOX> | ||
<CS.BOX.FLEX_ROW_CENTER_BOX> | ||
<BallJudgement type={"O"} /> | ||
<BallCount type={"OUT"} /> | ||
</CS.BOX.FLEX_ROW_CENTER_BOX> | ||
</S.BallCountBoard.BallCountBoard> | ||
); | ||
}; | ||
|
||
export default BallCountBoard; |
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 @@ | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const BallJudgement = ({ type }) => { | ||
return ( | ||
<S.BallCountBoard.BallJudgement>{type}</S.BallCountBoard.BallJudgement> | ||
); | ||
}; | ||
|
||
export default BallJudgement; |
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,7 @@ | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GameDisplay = () => { | ||
return <S.GameDisplay>GameDisplay</S.GameDisplay>; | ||
}; | ||
|
||
export default GameDisplay; |
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 @@ | ||
import InningInfo from "./InningInfo"; | ||
import PitchButton from "./PitchButton"; | ||
import GameDisplay from "./GameDisplay/GameDisplay"; | ||
import BallCountBoard from "./BallCountBoard/BallCountBoard"; | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GamePlayground = () => { | ||
const backgroundUrl = | ||
"https://upload.wikimedia.org/wikipedia/commons/8/80/Munhak_baseball_stadium_2012.png"; | ||
return ( | ||
<S.GamePlayground> | ||
<S.Background src={backgroundUrl} /> | ||
<BallCountBoard /> | ||
<InningInfo inningInfo={"2회초 수비"} /> | ||
<GameDisplay /> | ||
<PitchButton /> | ||
</S.GamePlayground> | ||
); | ||
}; | ||
|
||
export default GamePlayground; |
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,7 @@ | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const InningInfo = ({ inningInfo }) => { | ||
return <S.InningInfo>{inningInfo}</S.InningInfo>; | ||
}; | ||
|
||
export default InningInfo; |
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,7 @@ | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const PitchButton = () => { | ||
return <S.PitchButton>Pitch</S.PitchButton>; | ||
}; | ||
|
||
export default PitchButton; |
Oops, something went wrong.