Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ResultStates = map[string]string{
"win": "You Won!", "lose": "You Lost!",
}
TODO: Make this translatable
Functions ¶
This section is empty.
Types ¶
type BoardConfig ¶
type CustomModePage ¶
type CustomModePage struct { // contains filtered or unexported fields }
func NewCustomModePage ¶
func NewCustomModePage(parent *StartingView, settings *gio.Settings, toastOverlay *adw.ToastOverlay) *CustomModePage
type DifficultyPage ¶
type DifficultyPage struct { // contains filtered or unexported fields }
func NewDifficultyPage ¶
func NewDifficultyPage(parent *StartingView, settings *gio.Settings, toastOverlay *adw.ToastOverlay) *DifficultyPage
type GamePage ¶
func NewGamePage ¶
func NewGamePage(parent *MainWindow, settings *gio.Settings, toastOverlay *adw.ToastOverlay) *GamePage
type GameRulesPage ¶
func NewGameRulesPage ¶
func NewGameRulesPage(parent *MainWindow, settings *gio.Settings, toastOverlay *adw.ToastOverlay) *GameRulesPage
type MainWindow ¶
type MainWindow struct { *adw.ApplicationWindow // contains filtered or unexported fields }
func NewMainWindow ¶
func NewMainWindow(app *adw.Application, settings *gio.Settings) *MainWindow
func (*MainWindow) StartNewGame ¶
func (w *MainWindow) StartNewGame(name string, rows int, cols int, maxSteps uint)
StartNewGame calls NewBoard to initialize board, and changes view in main stack to show game page. NOTE: To get calculated amount of steps, you need to set maxSteps parameter to 0.
type ResultPage ¶
func NewResultPage ¶
func NewResultPage(parent *MainWindow, settings *gio.Settings, toastOverlay *adw.ToastOverlay) *ResultPage
func (*ResultPage) SetResultState ¶
func (r *ResultPage) SetResultState(isWin bool)
type StartingView ¶
type StartingView struct { // contains filtered or unexported fields }
func NewStartingView ¶
func NewStartingView(parent *MainWindow, settings *gio.Settings, toastOverlay *adw.ToastOverlay) *StartingView
Source Files ¶
Click to show internal directories.
Click to hide internal directories.