bot

package
v1.0.0-rc.23 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func NewBot

func NewBot(world World, discoverer engine.Discoverer) *Bot

func NewDijkstrasBot

func NewDijkstrasBot(world World) *Bot

func (*Bot) Countdown

func (b *Bot) Countdown(sec int)

func (*Bot) Me

func (b *Bot) Me(id uint32)

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) <-chan types.Direction

type Game

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

func NewGame

func NewGame() *Game

func (*Game) Create

func (g *Game) Create(object *types.Object)

func (*Game) Delete

func (g *Game) Delete(object *types.Object)

func (*Game) GetArea

func (g *Game) GetArea() engine.Area

func (*Game) GetObject

func (g *Game) GetObject(id uint32) (*types.Object, bool)

func (*Game) LookAround

func (g *Game) LookAround(sight engine.Sight) *engine.HashmapSight

func (*Game) Size

func (g *Game) Size(width, height uint8)

func (*Game) Update

func (g *Game) Update(object *types.Object)

type World

type World interface {
	LookAround(sight engine.Sight) *engine.HashmapSight
	GetArea() engine.Area
	GetObject(id uint32) (*types.Object, bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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