summaryrefslogtreecommitdiff
path: root/pkg/ui/views/game_api.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ui/views/game_api.go')
-rw-r--r--pkg/ui/views/game_api.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/ui/views/game_api.go b/pkg/ui/views/game_api.go
index f39a771..66b63c1 100644
--- a/pkg/ui/views/game_api.go
+++ b/pkg/ui/views/game_api.go
@@ -18,8 +18,11 @@ func (m GameModel) handleDatabaseGameMsg(msg database.Game) (GameModel, tea.Cmd)
peers := map[int]string{
1: m.game.IP1,
2: m.game.IP2,
- 3: m.game.IP3,
- 4: m.game.IP4,
+ }
+
+ if m.game.Type == database.PairGameType {
+ peers[3] = m.game.IP3
+ peers[4] = m.game.IP4
}
myPlayerNum := -1