Documentation ¶
Overview ¶
Package engine provides a simple P&P engine
Index ¶
- type Engine
- func (e Engine) GameOver()
- func (e *Engine) GameWon()
- func (e Engine) PizzaDelivery(fn func())
- func (e *Engine) Reaction(xp int, health int, player pnp.Player, state pnp.State, action pnp.Action, ...)
- func (e Engine) RenderGame(players []pnp.Player, p pnp.Player)
- func (e *Engine) RenderPlayers(players []pnp.Player, current pnp.Player) *tview.Flex
- func (e *Engine) RenderProd()
- func (e Engine) SelectAction(player pnp.Player, state pnp.State, onSelect func(action pnp.Action))
- func (e *Engine) Start()
- func (e *Engine) Stop()
- func (e *Engine) Welcome(fn func(bandName string))
- type Modal
- func (m *Modal) AddButtons(labels ...string) *Modal
- func (m *Modal) SetBackgroundColor(color tcell.Color) *Modal
- func (m *Modal) SetBorder(show bool) *Modal
- func (m *Modal) SetButtonsAlign(align int) *Modal
- func (m *Modal) SetDoneFunc(done func(buttonIndex int, buttonLabel string)) *Modal
- func (m *Modal) SetText(text string) *Modal
- func (m *Modal) SetTextAlign(align int) *Modal
- func (m *Modal) SetTextColor(color tcell.Color) *Modal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { App *tview.Application Pages *tview.Pages Menu *tview.List Prod *tview.TextView ProdState pnp.State }
func (Engine) PizzaDelivery ¶
func (e Engine) PizzaDelivery(fn func())
func (*Engine) RenderPlayers ¶
func (*Engine) RenderProd ¶
func (e *Engine) RenderProd()
func (Engine) SelectAction ¶
type Modal ¶
func (*Modal) AddButtons ¶
func (*Modal) SetBackgroundColor ¶
func (*Modal) SetButtonsAlign ¶
func (*Modal) SetDoneFunc ¶
func (*Modal) SetTextAlign ¶
func (*Modal) SetTextColor ¶
Click to show internal directories.
Click to hide internal directories.