world

package
v0.0.0-...-b2ff314 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type World

type World interface {
	Rows() int32
	Cols() int32
	Look(row, col int32) byte
	TryMove(row, col int32) bool
	Winner() byte
}

type WorldBase

type WorldBase struct {
	// contains filtered or unexported fields
}

func NewWorldBase

func NewWorldBase(row, col, goal int32) *WorldBase

func (*WorldBase) Cols

func (w *WorldBase) Cols() int32

func (*WorldBase) Look

func (w *WorldBase) Look(row, col int32) byte

func (*WorldBase) Rows

func (w *WorldBase) Rows() int32

func (*WorldBase) TryMove

func (w *WorldBase) TryMove(row, col int32) bool

func (WorldBase) Winner

func (w WorldBase) Winner() byte

type WorldMeta

type WorldMeta struct {
	*WorldBase

	sync.Mutex
	// contains filtered or unexported fields
}

func NewWorldMeta

func NewWorldMeta(wb *WorldBase, r io.Reader, w io.Writer) *WorldMeta

func (*WorldMeta) RemoteTryMove

func (wm *WorldMeta) RemoteTryMove() bool

func (*WorldMeta) TryMove

func (wm *WorldMeta) TryMove(row, col int32) bool

Jump to

Keyboard shortcuts

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