Documentation ¶
Index ¶
- Constants
- Variables
- func Abs(a int) uint
- func GenerateLocation(occupied map[string]bool, size uint) []int
- func Key(x, y, z int) string
- func LoadAssets(d Driver) error
- func LoadOFFMesh(d Driver, id string, data []byte, smooth bool) error
- func NewCameraEye() mgl32.Vec3
- func NewCameraLookAt() mgl32.Vec3
- func NewCameraUp() mgl32.Vec3
- func NewLight() mgl32.Vec3
- func NewModel() mgl32.Mat4
- func NewProjection(width, height float32) mgl32.Mat4
- func RandomLocation(size uint) int
- func Score(puzzle *Puzzle) (uint, uint)
- func ScoreDirection(size uint, player, goal []int, blocks map[string]bool, ...) int
- func ScoreDirections(size uint, player, goal []int, blocks map[string]bool, ...) (int, []int)
- type Animation
- type Driver
- type Game
- type Puzzle
- type ReleaseBallAnimation
- type Snapshot
- type Solution
Constants ¶
View Source
const ( ACCELERATION = 98.1 INCREMENT = 0.02 )
View Source
const ( BAD = -1 GOOD = 1 )
Variables ¶
View Source
var ( BackgroundColor = mgl32.Vec4{1, 1, 1, 1} GameLostColor = mgl32.Vec4{0.9, 0, 0, 1} GameWonColor = mgl32.Vec4{0.9, 0.9, 0, 1} RetryColor = mgl32.Vec4{0.9, 0, 0, 1} BlockColor = mgl32.Vec4{0.5, 0.5, 0.5, 1} GoalColor = mgl32.Vec4{0, 0.8, 0, 0.9} PlayerColor = mgl32.Vec4{1, 1, 0, 1} PortalColors = []mgl32.Vec4{ mgl32.Vec4{0, 0, 0.8, 0.9}, mgl32.Vec4{0.27, 0, 0.8, 0.9}, mgl32.Vec4{0.54, 0, 0.8, 0.9}, } )
View Source
var Block []byte
View Source
var Eight []byte
View Source
var Five []byte
View Source
var Four []byte
View Source
var FragmentShader string
View Source
var GameOver []byte
View Source
var Goal []byte
View Source
var Nine []byte
View Source
var One []byte
View Source
var Player []byte
View Source
var Point []byte
View Source
var Portal []byte
View Source
var Retry []byte
View Source
var Seconds []byte
View Source
var Seven []byte
View Source
var Six []byte
View Source
var Start []byte
View Source
var Three []byte
View Source
var Two []byte
View Source
var VertexShader string
View Source
var Zero []byte
Functions ¶
func LoadAssets ¶
func NewCameraEye ¶
func NewCameraLookAt ¶
func NewCameraUp ¶
func NewProjection ¶
func RandomLocation ¶
func ScoreDirection ¶
Types ¶
type Animation ¶
type Animation interface {
Tick() bool // Return true if animation has completed
}
func NewGameOverAnimation ¶
type Game ¶
type Puzzle ¶
type ReleaseBallAnimation ¶
func NewReleaseBallAnimation ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.