view

package
v0.0.0-...-56193ee Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package view contains all of the code that is concerned with communicating game information to the players, other than that which is in the main loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type View

type View struct {
	SelectedY, SelectedX int
	// contains filtered or unexported fields
}

Represents the UI of the game; contains all UI state.

func NewView

func NewView(s tcell.Screen) *View

Used to create new View structs.

func (*View) Draw

func (v *View) Draw(g *game.Game)

Given a game.Game structure, turns the state of the game described in that structure into its UI representation.

func (*View) MoveSelect

func (v *View) MoveSelect(key tcell.Key) error

Implements the logic of what happens when the user presses a key.

Jump to

Keyboard shortcuts

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