actors

package
v0.0.0-...-281f1f0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AI

type AI struct {
	*tank.Tank
	// contains filtered or unexported fields
}

func NewAI

func NewAI() *AI

func (*AI) Move

func (ai *AI) Move(orientation consts.Orientation)

func (*AI) RandomDirection

func (ai *AI) RandomDirection()

func (*AI) RandomShoot

func (ai *AI) RandomShoot()

func (*AI) SetTank

func (ai *AI) SetTank(tank *tank.Tank)

func (*AI) Tick

func (ai *AI) Tick(dt time.Duration)

type Tank

type Tank interface {
	MoveLeft()
	MoveRight()
	MoveUp()
	MoveDown()
	Stop()
	Shoot()

	GetSpeed() *pixel.Vec
	GetPos() *pixel.Vec
}

type User

type User struct {
	Tank Tank
}

func (*User) AttachToKeyboard

func (u *User) AttachToKeyboard(keyboard keyboardInterface)

func (*User) SetTank

func (u *User) SetTank(tank Tank)

Jump to

Keyboard shortcuts

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