Documentation ¶
Index ¶
- func PosLess(a, b Pos) bool
- type Board
- func (b *Board) AddChar(char Char)
- func (b *Board) Attack(er, ee Char) (Char, bool)
- func (b *Board) Chars() []Char
- func (b *Board) Dump()
- func (b *Board) DumpEdges()
- func (b *Board) DumpWithDecoration(decoration Pos, decorationChar rune)
- func (b *Board) DumpWithDecorations(decorations []Pos, decorationChar rune)
- func (b *Board) MoveChar(src Char, destPos Pos) Char
- func (b *Board) OpenSurroundingPositions(pos Pos) []Pos
- func (b *Board) RemoveChar(char Char)
- func (b *Board) ShortestPath(from, to Pos) []Pos
- func (b *Board) SurroundingCharacters(pos Pos) []Char
- func (b *Board) Validate() bool
- type Char
- type CharByReadingOrder
- type Graph
- type GraphEdge
- type Pos
- type PosByReadingOrder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Board ¶
type Board struct {
// contains filtered or unexported fields
}
func (*Board) DumpWithDecoration ¶
func (*Board) DumpWithDecorations ¶
func (*Board) OpenSurroundingPositions ¶
surrounding positions that are '.' (I.e. not walls and not characters)
func (*Board) RemoveChar ¶
func (*Board) ShortestPath ¶
func (*Board) SurroundingCharacters ¶
type CharByReadingOrder ¶
type CharByReadingOrder []Char
func (CharByReadingOrder) Len ¶
func (a CharByReadingOrder) Len() int
func (CharByReadingOrder) Less ¶
func (a CharByReadingOrder) Less(i, j int) bool
func (CharByReadingOrder) Swap ¶
func (a CharByReadingOrder) Swap(i, j int)
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
func (*Graph) RemoveEdge ¶
type PosByReadingOrder ¶
type PosByReadingOrder []Pos
func (PosByReadingOrder) Len ¶
func (a PosByReadingOrder) Len() int
func (PosByReadingOrder) Less ¶
func (a PosByReadingOrder) Less(i, j int) bool
func (PosByReadingOrder) Swap ¶
func (a PosByReadingOrder) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.