package plays import ( "time" "gitea.konchin.com/ytshih/inp2025/game/types" tea "github.com/charmbracelet/bubbletea" "github.com/go-resty/resty/v2" ) const ( refreshTick = 100 * time.Millisecond refetchTick = 1 * time.Second ) func Tick(d time.Duration) tea.Cmd { return tea.Tick(d, func(t time.Time) tea.Msg { return types.TickMsg(t) }) } type Base struct { client *resty.Client username string } func NewBase(client *resty.Client) *Base { return &Base{ client: client, username: "", } } func (m *Base) Init() tea.Cmd { return nil } func (m *Base) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: switch msg.String() { case "ctrl+l": return m, tea.ClearScreen case "ctrl+c": return m, tea.Interrupt } } return m, nil } func (m *Base) View() string { return "" }