ai

package
v0.0.0-...-4bf0284 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnemyAI

type EnemyAI struct {
}

func MakeEnemyAI

func MakeEnemyAI() *EnemyAI

func (*EnemyAI) ConfirmRazeTown

func (ai *EnemyAI) ConfirmRazeTown(city *citylib.City) bool

func (*EnemyAI) NewTurn

func (ai *EnemyAI) NewTurn(player *playerlib.Player)

func (*EnemyAI) PostUpdate

func (ai *EnemyAI) PostUpdate(self *playerlib.Player, enemies []*playerlib.Player)

func (*EnemyAI) ProducedUnit

func (ai *EnemyAI) ProducedUnit(city *citylib.City, player *playerlib.Player)

stop producing that unit

func (*EnemyAI) Update

func (ai *EnemyAI) Update(self *playerlib.Player, enemies []*playerlib.Player, aiServices playerlib.AIServices, manaPerTurn int) []playerlib.AIDecision

type RaiderAI

type RaiderAI struct {
	MovedStacks map[*playerlib.UnitStack]bool
}

func MakeRaiderAI

func MakeRaiderAI() *RaiderAI

func (*RaiderAI) ConfirmRazeTown

func (raider *RaiderAI) ConfirmRazeTown(city *citylib.City) bool

func (*RaiderAI) CreateUnits

func (raider *RaiderAI) CreateUnits(player *playerlib.Player) []playerlib.AIDecision

func (*RaiderAI) MoveStacks

func (raider *RaiderAI) MoveStacks(player *playerlib.Player, enemies []*playerlib.Player, pathfinder playerlib.AIServices) []playerlib.AIDecision

func (*RaiderAI) NewTurn

func (raider *RaiderAI) NewTurn(player *playerlib.Player)

func (*RaiderAI) PostUpdate

func (raider *RaiderAI) PostUpdate(self *playerlib.Player, enemies []*playerlib.Player)

func (*RaiderAI) ProducedUnit

func (raider *RaiderAI) ProducedUnit(city *citylib.City, player *playerlib.Player)

func (*RaiderAI) Update

func (raider *RaiderAI) Update(player *playerlib.Player, enemies []*playerlib.Player, pathfinder playerlib.AIServices, manaPerTurn int) []playerlib.AIDecision

Jump to

Keyboard shortcuts

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