diff options
author | Santo Cariotti <santo@dcariotti.me> | 2025-04-24 18:19:39 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2025-04-24 18:19:39 +0200 |
commit | ded19d8613f67a9a10834e2c4f6ed398d54c5638 (patch) | |
tree | 4902a9ce5937b7d144b996b9122d30df61b83168 /pkg/ui/views/game_api.go | |
parent | 162da285062bfdd47fa8254483a45a68f1cce421 (diff) |
Fix winner text on co-op 2vs2
Diffstat (limited to 'pkg/ui/views/game_api.go')
-rw-r--r-- | pkg/ui/views/game_api.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/ui/views/game_api.go b/pkg/ui/views/game_api.go index 2f32f70..f39a771 100644 --- a/pkg/ui/views/game_api.go +++ b/pkg/ui/views/game_api.go @@ -88,7 +88,7 @@ type EndGameMsg struct { type RestoreGameMsg struct{} -func (m *GameModel) endGame(outcome string) tea.Cmd { +func (m *GameModel) endGame(outcome string, abandon bool) tea.Cmd { return func() tea.Msg { var game database.Game @@ -115,6 +115,10 @@ func (m *GameModel) endGame(outcome string) tea.Cmd { return err } + if abandon { + m.network.SendAll([]byte("abandon"), []byte("🏳️")) + } + return game } } |