Documentation
¶
Index ¶
Constants ¶
View Source
const ( WALL = "wall" PLAYER = "player" FIREBALL = "fireball" CASTLE = "castle" NORTH = "north" SOUTH = "south" EAST = "east" WEST = "west" PLAYER_MAX_HEALTH = 5 )
View Source
const ( WIDTH = 30 HEIGHT = 20 )
View Source
const ( PURPLE = lipgloss.Color("13") GREEN = lipgloss.Color("10") )
View Source
const (
TICK_DURATION_MS = 100
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) CastSpells ¶
func (a *App) CastSpells()
type CastSpellMsg ¶
type Entity ¶
type Entity struct {
Skin string
Type string
ID string
NextMove string
Indestructible bool
RemoveOnContact bool
Health int
Damage int
IsDead bool
}
func CreateCastle ¶
func CreateCastle() *Entity
func CreateFireball ¶
func CreateNextPlayer ¶
func CreateNextPlayer() *Entity
type Grid ¶
type Grid [][]*Entity
func (*Grid) DealDamage ¶
func (*Grid) PlaceCastles ¶
func (g *Grid) PlaceCastles()
func (*Grid) PlacePlayer ¶
type GridUpdateMsg ¶
type GridUpdateMsg struct {
Grid Grid
}
type PlanMoveMsg ¶
type TryRespawnMsg ¶
type TryRespawnMsg struct {
ID string
}
Click to show internal directories.
Click to hide internal directories.