Documentation ¶
Index ¶
- Variables
- func ClearCode(pos *int, grid *gtk.Grid, code *[4]int)
- func GameEnd(gui *GuiElements, gs *GameState)
- func SetClicked(color int, code *[4]int, pos *int, gridPtr **gtk.Grid, ok *gtk.Button) func(button *gtk.DrawingArea, e *gdk.Event) bool
- func SetColor(R float64, G float64, B float64) func(da *gtk.DrawingArea, cr *cairo.Context) bool
- func StartGame(gui *GuiElements, gs *GameState)
- type ErrorHandlingBuilder
- type GameState
- type GuiElements
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = [6][3]float64{
{0.929, 0.200, 0.231},
{1.000, 0.639, 0.282},
{0.341, 0.890, 0.537},
{0.384, 0.627, 0.917},
{0.752, 0.380, 0.796},
{0.964, 0.960, 0.956},
}
6 colors represented as RGB values between 0 and 1
Functions ¶
func SetClicked ¶
func SetClicked(color int, code *[4]int, pos *int, gridPtr **gtk.Grid, ok *gtk.Button) func(button *gtk.DrawingArea, e *gdk.Event) bool
Set element `pos` of `code` to `color`. Create circle with `color` in `gridPtr`. Activate `ok` button if `pos` reached 4
func StartGame ¶
func StartGame(gui *GuiElements, gs *GameState)
Types ¶
type ErrorHandlingBuilder ¶
func (*ErrorHandlingBuilder) MustGetObject ¶
func (b *ErrorHandlingBuilder) MustGetObject(id string) glib.IObject
Helper that panics if object was not found Reduces iferr boilerplate when preset objects are loaded once and are not destroyed
type GuiElements ¶
type GuiElements struct {
// contains filtered or unexported fields
}
func BuildGui ¶
func BuildGui() (gui *GuiElements)
Create GUI struct and bind basic function, like closing
Click to show internal directories.
Click to hide internal directories.