File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ func (gs *GameState) TotalRoundsPlayed() int {
6565 return gs .Called ().Int (0 )
6666}
6767
68+ // GamePhase is a mock-implementation of IGameState.GamePhase().
69+ func (gs * GameState ) GamePhase () common.GamePhase {
70+ return gs .Called ().Get (0 ).(common.GamePhase )
71+ }
72+
6873// IsWarmupPeriod is a mock-implementation of IGameState.IsWarmupPeriod().
6974func (gs * GameState ) IsWarmupPeriod () bool {
7075 return gs .Called ().Bool (0 )
Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ func (gs GameState) TotalRoundsPlayed() int {
106106 return gs .totalRoundsPlayed
107107}
108108
109+ // GamePhase returns the game phase of the current game state. See common/gamerules.go for more.
110+ func (gs GameState ) GamePhase () common.GamePhase {
111+ return gs .gamePhase
112+ }
113+
109114// IsWarmupPeriod returns whether the game is currently in warmup period according to CCSGameRulesProxy.
110115func (gs GameState ) IsWarmupPeriod () bool {
111116 return gs .isWarmupPeriod
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ type IGameState interface {
4444 Bomb () * common.Bomb
4545 // TotalRoundsPlayed returns the amount of total rounds played according to CCSGameRulesProxy.
4646 TotalRoundsPlayed () int
47+ // GamePhase returns the game phase of the current game state. See common/gamerules.go for more.
48+ GamePhase () common.GamePhase
4749 // IsWarmupPeriod returns whether the game is currently in warmup period according to CCSGameRulesProxy.
4850 IsWarmupPeriod () bool
4951 // IsMatchStarted returns whether the match has started according to CCSGameRulesProxy.
You can’t perform that action at this time.
0 commit comments