spacetea/main.go

29 lines
536 B
Go
Raw Normal View History

2022-05-17 23:29:59 -04:00
package main
import (
"fmt"
"os"
sim "git.saintnet.tech/stryan/spacetea/simulator"
2022-08-22 18:39:41 -04:00
2022-05-17 23:29:59 -04:00
tea "github.com/charmbracelet/bubbletea"
)
func main() {
2022-08-22 18:39:41 -04:00
simulator := sim.NewSimulator()
2022-08-22 19:34:53 -04:00
player := sim.NewPlayer()
2022-08-22 19:00:15 -04:00
acc := &Account{
2022-08-22 19:34:53 -04:00
Player: player,
2022-08-22 19:00:15 -04:00
Simulator: simulator,
Landmark: nil,
}
2022-08-22 19:34:53 -04:00
sim.Demo(acc.Player, acc.Simulator)
2022-05-18 22:47:48 -04:00
simulator.Start()
2022-08-22 19:00:15 -04:00
parent := parent{initMainscreen(acc)}
if err := tea.NewProgram(parent, tea.WithAltScreen()).Start(); err != nil {
2022-05-17 23:29:59 -04:00
fmt.Printf("Uh oh, there was an error: %v\n", err)
os.Exit(1)
}
}