Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Are ya winnin' son? GameStateWin = iota GameStateLose GameStateOngoing )
The different states of a game
View Source
const ( TileTypeMine = iota TileTypeEmpty TileType0 TileType1 TileType2 TileType3 TileType4 TileType5 TileType6 TileType7 TileType8 )
TileTypes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MineCounter ¶
type MineCounter struct { *fyne.Container // contains filtered or unexported fields }
MineCounter counts the possible remaining mines
func NewMineCounter ¶
func NewMineCounter(init int) *MineCounter
NewMineCounter reates a new mine counter
type SmileyMan ¶
SmileyMan controls everything. God, you mean? No.
func NewSmileyMan ¶
NewSmileyMan creates a new smileyman
func (*SmileyMan) MouseDown ¶
func (sm *SmileyMan) MouseDown(ev *desktop.MouseEvent)
MouseDown impl for desktop clicks
func (*SmileyMan) MouseUp ¶
func (sm *SmileyMan) MouseUp(ev *desktop.MouseEvent)
MouseUp impl for desktop clicks
type Tile ¶
type Tile struct { widget.Icon Base TileType IsOpen bool IsFlagged bool Row int Col int OpenHandler func(int, int) MarkHandler func(int, int) }
Tile stores the data and state of a tile on the game board
func NewTile ¶
func NewTile(tileType TileType, row, col int, openHandler func(int, int), markHandler func(int, int)) *Tile
NewTile creates a new tile of the given type
func (*Tile) MouseDown ¶
func (t *Tile) MouseDown(ev *desktop.MouseEvent)
MouseDown impl for desktop clicks
func (*Tile) MouseIn ¶
func (t *Tile) MouseIn(ev *desktop.MouseEvent)
MouseIn impl for desktop clicks
func (*Tile) MouseMoved ¶
func (t *Tile) MouseMoved(ev *desktop.MouseEvent)
MouseMoved impl for desktop clicks
func (*Tile) MouseUp ¶
func (t *Tile) MouseUp(ev *desktop.MouseEvent)
MouseUp impl for desktop clicks
type TimeCounter ¶
type TimeCounter struct { *fyne.Container // contains filtered or unexported fields }
TimeCounter counts the time
func NewTimeCounter ¶
func NewTimeCounter(init int) *TimeCounter
NewTimeCounter creates a new time counter
Click to show internal directories.
Click to hide internal directories.