Draft: poop

This commit is contained in:
2025-11-10 13:16:29 +08:00
parent dbd2ed6469
commit 30fb3d8c73
18 changed files with 503 additions and 44 deletions

39
stages/game.go Normal file
View File

@@ -0,0 +1,39 @@
package stages
import (
"inp2025/models"
"strings"
tea "github.com/charmbracelet/bubbletea"
)
type GameModel struct {
state models.GameState
}
func NewGameModel() *GameModel {
return &GameModel{}
}
func (m *GameModel) Init() tea.Cmd {
return tea.ClearScreen
}
func (m *GameModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmds []tea.Cmd
switch msg := msg.(type) {
case tea.KeyMsg:
switch msg.String() {
case "ctrl+c":
return m, tea.Quit
}
}
return m, tea.Batch(cmds...)
}
func (m *GameModel) View() string {
var b strings.Builder
return b.String()
}