starter repo

This commit is contained in:
wagslane
2024-04-02 12:38:06 -06:00
parent d4a1dc9bdf
commit 4885f7a113
18 changed files with 624 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
package gamelogic
import (
"fmt"
"github.com/bootdotdev/learn-pub-sub-starter/internal/routing"
)
func (gs *GameState) HandlePause(ps routing.PlayingState) {
defer fmt.Println("------------------------")
fmt.Println()
if ps.IsPaused {
fmt.Println("==== Pause Detected ====")
gs.pauseGame()
} else {
fmt.Println("==== Resume Detected ====")
gs.resumeGame()
}
}