ai

package
v0.0.0-...-7004f9a Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoExplorer

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

AutoExplorer automatically explores the map, allowing the player to break out if he wants.

func NewAutoExplorer

func NewAutoExplorer(pc *PlayerController) *AutoExplorer

NewAutoExplorer initializes & returns an explorer entity.

func (*AutoExplorer) GetAction

func (e *AutoExplorer) GetAction(obj object.GameObject, worldMap cartography.Map) func()

GetAction returns this player's action.

type InputProvider

type InputProvider interface {
	GetDirection() cartography.Direction

	RepeatModeTriggered() bool
	AutoExploreTriggered() bool
}

InputProvider provides input from the player.

type PlayerController

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

PlayerController exposes player behavior as an AI agent.

func NewPlayerController

func NewPlayerController(provider InputProvider) *PlayerController

NewPlayerController returns a new player controller.

func (*PlayerController) GetAction

func (pc *PlayerController) GetAction(obj object.GameObject, worldMap cartography.Map) func()

GetAction returns the action performed by this entity.

Jump to

Keyboard shortcuts

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