fix: address review issues in screen extraction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
10
ui/model.go
10
ui/model.go
@@ -8,11 +8,6 @@ import (
|
||||
"github.com/tolelom/catacombs/store"
|
||||
)
|
||||
|
||||
// StateUpdateMsg is sent by GameSession to update the view
|
||||
type StateUpdateMsg struct {
|
||||
State game.GameState
|
||||
}
|
||||
|
||||
type tickMsg struct{}
|
||||
|
||||
type Model struct {
|
||||
@@ -66,11 +61,6 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.ctx.Height = 24
|
||||
}
|
||||
return m, nil
|
||||
case StateUpdateMsg:
|
||||
if gs, ok := m.currentScreen.(*GameScreen); ok {
|
||||
gs.gameState = msg.State
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
next, cmd := m.currentScreen.Update(msg, m.ctx)
|
||||
|
||||
Reference in New Issue
Block a user