Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_COLOR = termbox.ColorDefault
View Source
const EMPTY_SPACE = " "
View Source
const LINE_CHAR = "-"
View Source
const SEPARATOR = " "
Constants
View Source
const TILE_PADDING = 1
View Source
const VERTICAL_BAR = "|"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputHandler ¶
type InputHandler struct{}
func CreateInputHandler ¶
func CreateInputHandler() *InputHandler
func (*InputHandler) ReadInputEvent ¶
func (in *InputHandler) ReadInputEvent() constants.InputEvent
func (*InputHandler) ReadKey ¶
func (in *InputHandler) ReadKey() termbox.Event
We are technically leaking a termbox struct out of this package if someone uses it, but it doesn't really matter in this case (it won't even be used apart from "continues"
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Actual renderer class Note: Since termbox is being used for this, we could actually not store this and just obtain it from termbox on every redraw. We'll assume no one will really be resizing this while playing though, as even resizing on every redraw would not be good enough (i.e. it would still require a redraw call
func CreateRenderer ¶
func CreateRenderer() *Renderer
func (*Renderer) ClearScreen ¶
func (r *Renderer) ClearScreen()
func (*Renderer) FlushScreen ¶
func (r *Renderer) FlushScreen()
func (*Renderer) RenderVictoryMessage ¶
func (*Renderer) RenderWelcomeMessage ¶
func (r *Renderer) RenderWelcomeMessage()
Click to show internal directories.
Click to hide internal directories.