view

package
v0.0.0-...-6c50e3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package view is responsible for the UI of the game. This can be thought of as the View part of an MVC architecture.

The UI is a thin HTML layer, it contains an HTML page with some embedded JavaScript. No external JavaScript libraries are used, everything is "self-made".

The net/http package is used to serve the HTTP clients (browsers).

Index

Constants

View Source
const AppTitle = "Gopher's Labyrinth - First Gopher Gala (2015)"

Title as the application - as it appears in the Browser title

Variables

View Source
var (
	// Width of the client view in pixels
	ViewWidth int
	// Width of the client view in pixels
	ViewHeight int
)
View Source
var Params = struct {
	Title         string
	Width, Height *int
	RunId         int64
	ShowFreezeBtn bool
}{AppTitle, &ViewWidth, &ViewHeight, time.Now().Unix(), false}

The client's (browser's) view position inside the Labyrinth image. This is the top-left point of the view.

Functions

func InitNew

func InitNew()

InitNew initializes a new game.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL