Skip to content

Commit fdcc433

Browse files
committed
Register an error event handler in the the client template
1 parent e971cbe commit fdcc433

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

new/client/templates/wrappers/main.go.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ func main() {
4242

4343
fmt.Println("GameID:", game.Id)
4444

45-
// TODO register event listeners
45+
game.OnCGErrorEvent(func(origin tictactoesimple.Player, data cg.ErrorEventData) {
46+
fmt.Println("error:", data.Message)
47+
})
4648

4749
game.Run()
4850
}

0 commit comments

Comments
 (0)