game

package
v0.0.0-...-cdc9904 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 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 Actor

type Actor interface {
	Capture(node *models.Node) bool
	ChooseNext(node *models.Node) *models.Node
}

type Firewall

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

func (*Firewall) Capture

func (f *Firewall) Capture(node *models.Node) bool

func (*Firewall) ChooseNext

func (f *Firewall) ChooseNext(node *models.Node) *models.Node

type Game

type Game struct {
	Paused bool
}

func (*Game) Pause

func (g *Game) Pause()

func (*Game) Run

func (g *Game) Run()

type Player

type Player struct {
}

func (*Player) Capture

func (p *Player) Capture(node *models.Node) bool

func (*Player) ChooseNext

func (p *Player) ChooseNext(node *models.Node) *models.Node

func (*Player) Traverse

func (p *Player) Traverse(current, final *models.Node)

type Round

type Round struct {
	PlayerNodeStart     *models.Node
	FirewallNodeStart   *models.Node
	Target              *models.Node
	CurrentPlayerNode   *models.Node
	CurrentFirewallNode *models.Node
	NodesMap            map[string]*models.Node
	CaptureTime         time.Time
	BreachDetected      bool
}

func NewRound

func NewRound() *Round

func (*Round) CheckPlayerLoose

func (r *Round) CheckPlayerLoose() bool

func (*Round) CheckPlayerWin

func (r *Round) CheckPlayerWin() bool

Jump to

Keyboard shortcuts

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