Documentation ¶
Index ¶
- Constants
- Variables
- func BeginDrawingLoop() chan DrawingEvent
- func DrawDrawable(d Drawable)
- func DrawStack(cs game.CardStack, x, y int, maxHeight int, selected int)
- func RenderCard(c game.Card, x, y int, compress, selected bool)
- func RenderEmptyCell(label EmptyCellLabel, isSelected bool, x, y int)
- func SetCapabilitySetting(newCap CapabilitySetting)
- func SetScreen(newScreen tcell.Screen)
- type CapabilitySetting
- type Drawable
- type DrawableCard
- type DrawableEmptyCell
- type DrawingEvent
- type DrawingEventNewAnimator
- type DrawingEventNewOverlay
- type DrawingEventSync
- type EmptyCellLabel
- type Layout
- type MultiAnimator
- type MultiOverlay
- type Overlay
- type ScreenPoint
- type StatusBarOverlay
- type YouWinOverlay
Constants ¶
View Source
const ( EmptyCellLabelFree = iota EmptyCellLabelHome EmptyCellLabelNone )
View Source
const ( //TODO: Support drawing with only letters CapabilitySettingLetters = iota CapabilitySettingUnicode CapabilitySettingEmoji )
View Source
const BackgroundColor = tcell.Color29
View Source
const CardHeight = 7
View Source
const CardWidth = 9
View Source
const EmojiAddon = '\uFE0F'
View Source
const EmptyCellColor = tcell.Color23
View Source
const EmptyCellSelectedColor = tcell.Color35
Variables ¶
View Source
var SuitBackupRunes = []rune{
'C',
'S',
'H',
'D',
}
View Source
var SuitRunes = []rune{
'\u2663',
'\u2660',
'\u2665',
'\u2666',
}
Functions ¶
func BeginDrawingLoop ¶
func BeginDrawingLoop() chan DrawingEvent
func DrawDrawable ¶
func DrawDrawable(d Drawable)
func RenderEmptyCell ¶
func RenderEmptyCell(label EmptyCellLabel, isSelected bool, x, y int)
func SetCapabilitySetting ¶
func SetCapabilitySetting(newCap CapabilitySetting)
Types ¶
type CapabilitySetting ¶
type CapabilitySetting int
type DrawableCard ¶
func (DrawableCard) DrawAt ¶
func (dc DrawableCard) DrawAt(x, y int)
func (DrawableCard) GetPos ¶
func (dc DrawableCard) GetPos() (int, int)
type DrawableEmptyCell ¶
type DrawableEmptyCell struct { Label EmptyCellLabel Selected bool X, Y int }
func (DrawableEmptyCell) DrawAt ¶
func (dec DrawableEmptyCell) DrawAt(x, y int)
func (DrawableEmptyCell) GetPos ¶
func (dec DrawableEmptyCell) GetPos() (int, int)
type DrawingEvent ¶
type DrawingEvent interface{}
type DrawingEventNewAnimator ¶
type DrawingEventNewAnimator struct {
Anim *MultiAnimator
}
type DrawingEventNewOverlay ¶
type DrawingEventNewOverlay struct {
Overlay Overlay
}
type DrawingEventSync ¶
type DrawingEventSync struct{}
type EmptyCellLabel ¶
type EmptyCellLabel int
type Layout ¶
type Layout struct { StackPositions [8]ScreenPoint FreePositions [4]ScreenPoint HomePositions [4]ScreenPoint //TODO: make hand have a dynamic position based on what is on screen (to avoid squishing etc) HandPosition ScreenPoint }
func (*Layout) AnimateTables ¶
func (l *Layout) AnimateTables(tables []*game.Table) *MultiAnimator
type MultiAnimator ¶
type MultiAnimator struct {
// contains filtered or unexported fields
}
func (*MultiAnimator) AdvanceAnimation ¶
func (m *MultiAnimator) AdvanceAnimation() bool
Returns true if done, false otherwise
func (*MultiAnimator) DrawFinished ¶
func (m *MultiAnimator) DrawFinished()
func (*MultiAnimator) DrawToScreen ¶
func (m *MultiAnimator) DrawToScreen()
func (*MultiAnimator) SetFinished ¶
func (m *MultiAnimator) SetFinished()
type MultiOverlay ¶
type MultiOverlay []Overlay
func (MultiOverlay) Draw ¶
func (m MultiOverlay) Draw()
type ScreenPoint ¶
type ScreenPoint struct {
X, Y int
}
type StatusBarOverlay ¶
type StatusBarOverlay struct {
Left, Middle, Right string
}
func (StatusBarOverlay) Draw ¶
func (o StatusBarOverlay) Draw()
type YouWinOverlay ¶
type YouWinOverlay struct{}
func (YouWinOverlay) Draw ¶
func (o YouWinOverlay) Draw()
Click to show internal directories.
Click to hide internal directories.