Skip to content

Commit

Permalink
Fix current player being changed on resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben9922 committed Apr 10, 2023
1 parent 693306f commit c1fdbea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg.(type) {
case tea.KeyMsg:
m.view = PointSelection
}

// Update current player *after* displaying PointConfirmation view
if m.currentPlayer == DarkPlayer {
m.currentPlayer = LightPlayer
} else if m.currentPlayer == LightPlayer {
m.currentPlayer = DarkPlayer
// Update current player *after* displaying PointConfirmation view
if m.currentPlayer == DarkPlayer {
m.currentPlayer = LightPlayer
} else if m.currentPlayer == LightPlayer {
m.currentPlayer = DarkPlayer
}
}
case TitleView:
switch msg.(type) {
Expand Down

0 comments on commit c1fdbea

Please sign in to comment.