-
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
6608656
commit 83c20a3
Showing
3 changed files
with
174 additions
and
76 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
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,80 @@ | ||
import { BallStatus } from './Constant'; | ||
|
||
interface ISequence { | ||
action: string; | ||
nullified: boolean; | ||
} | ||
|
||
export interface IBallstate { | ||
label: string; | ||
status: BallStatus; | ||
foul: number; | ||
hits: string[]; | ||
activeHits: string[]; | ||
hitBy: string[]; | ||
} | ||
|
||
interface IScoreInfo { | ||
point: number; | ||
contesting: number; | ||
firstLocked: number; | ||
secondLocked: number; | ||
eliminated: number; | ||
} | ||
|
||
interface ITeamState { | ||
score: IScoreInfo; | ||
pendingRescue: string[]; | ||
balls: IBallstate[]; | ||
} | ||
|
||
type TeamKeys = 'r' | 'w'; | ||
interface IMatchInfo { | ||
winner: string; | ||
r: ITeamState; | ||
w: ITeamState; | ||
sequences: ISequence[]; | ||
} | ||
|
||
interface IGameTeamInfo { | ||
name: string; | ||
} | ||
|
||
type MissHitType = 'MY' | 'WWSC'; | ||
|
||
export interface IGameRules { | ||
name: string; | ||
config: { | ||
points: { | ||
contesting: number; | ||
firstLocked: number; | ||
secondLocked: number; | ||
eliminated: number; | ||
}; | ||
missHitType: MissHitType; | ||
}; | ||
} | ||
|
||
interface IGameInfo { | ||
rules: IGameRules; | ||
r: IGameTeamInfo; | ||
w: IGameTeamInfo; | ||
} | ||
|
||
export interface IBall { | ||
team: TeamKeys; | ||
idx: number; | ||
} | ||
|
||
type RescueType = 'normal' | 'missHit'; | ||
export interface IRescueBall { | ||
type: RescueType; | ||
ball: IBall; | ||
} | ||
|
||
export type nullifyType = 'rescue' | 'eliminate' | 'rescueMissHit'; | ||
|
||
export interface IGameState { | ||
info: IGameInfo; | ||
match: IMatchInfo; | ||
} |