Documentation
¶
Index ¶
- Variables
- func Chunk(slice []Upgrade, chunkSize int) [][]Upgrade
- func List(upgrades []Upgrade) []string
- type Achievement
- type Layer
- type LayerMsg
- type LayerTickMsg
- type Layers
- type Milestone
- type Model
- func (m *Model) CheckUnlock() bool
- func (m *Model) GetDimensions() constants.Dimensions
- func (m *Model) ListUpgradeAvailable() bool
- func (m *Model) ListUpgradeEnabled() []Upgrade
- func (m *Model) SaveBestAmount()
- func (m *Model) SetDimensions(dimensions constants.Dimensions)
- func (m *Model) UpdateProgramContext(ctx *context.ProgramContext)
- func (m *Model) ViewLocked() string
- type ModelAchievement
- type ModelMilestone
- type ModelUpgrade
- type Upgrade
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContainerPadding = 1 ContainerStyle = lipgloss.NewStyle(). Padding(ContainerPadding) MainContentBlock = ContainerStyle.Copy().Border(lipgloss.NormalBorder(), true) SidebarBlock = ContainerStyle.Copy().Border(lipgloss.NormalBorder(), true) )
Functions ¶
Types ¶
type Achievement ¶
type Achievement interface { Tick() Done() bool Effect() Unlocked() bool Model() *ModelAchievement }
type Layer ¶
type Layer interface { Tick() // Run on each tick TickAmount() float64 // Amount generated on each tick Prestige() // Run when player wants to prestige the layer PrestigeAmount() float64 // Amount generated when prestiged Reset() // Called when the layer needs to be reseted Update(msg tea.Msg) (Layer, tea.Cmd) View() string Model() *Model UpdateProgramContext(ctx *context.ProgramContext) }
type LayerTickMsg ¶
type LayerTickMsg struct {
LayerId int
}
func (LayerTickMsg) GetLayerId ¶
func (msg LayerTickMsg) GetLayerId() int
type Milestone ¶
type Milestone interface { Tick() Done() bool Unlocked() bool Model() *ModelMilestone }
type Model ¶
type Model struct { Name string // Name of the layer Id int // Unique ID of the layer Tier int // Tier of the layer Unlocked bool // Has the layer been unlocked? Required map[Layer]float64 // Required layers and amount to unlock it Layers *Layers // Every layers used, to easily access them Amount float64 // Current amount AmountTotal float64 // Total amount generated AmountBest float64 // Best amount reached Achievements []Achievement // All layer achievements Milestones []Milestone // All layer milestones Upgrades []Upgrade // All layer upgrades Ctx *context.ProgramContext // Program context // contains filtered or unexported fields }
func (*Model) CheckUnlock ¶
func (*Model) GetDimensions ¶
func (m *Model) GetDimensions() constants.Dimensions
func (*Model) ListUpgradeAvailable ¶
func (*Model) ListUpgradeEnabled ¶
func (*Model) SaveBestAmount ¶
func (m *Model) SaveBestAmount()
func (*Model) SetDimensions ¶
func (m *Model) SetDimensions(dimensions constants.Dimensions)
func (*Model) UpdateProgramContext ¶
func (m *Model) UpdateProgramContext(ctx *context.ProgramContext)
func (*Model) ViewLocked ¶
type ModelAchievement ¶
type ModelMilestone ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.