board

package
v0.0.0-...-f5285af Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nothing = iota
	Water
	Desert
	Wood
	Brick
	Sheep
	Wheat
	Ore
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Tiles   [][]Tile
	Corners []XY
	Towns   map[XY]Town
}

func New

func New(tilePlaces [][]byte, numKlass []int, numbers []int) Board

func NewSimple

func NewSimple() Board

func (*Board) FindCorner

func (b *Board) FindCorner(xy XY) *XY

type Tile

type Tile struct {
	Klass     int
	Number    int
	HasRobber bool
}

type Town

type Town struct {
	Owner int
	Type  int // 1 == Settlement, 2 == City (num victory points)
}

type XY

type XY struct {
	X float64
	Y float64
}

func (*XY) Distance

func (xy *XY) Distance(other *XY) float64

Jump to

Keyboard shortcuts

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