Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 source pure

Package roster is the versioned fighter set for Cage Match. v0 ships three house fighters. Community fighters join in...

Overview

Package roster is the versioned fighter set for Cage Match. v0 ships three house fighters. Community fighters join in later versions: Gno realms cannot call code by path or persist function values, so new fighters enter through a new roster package version.

Functions 3

func All

1func All() []engine.Fighter
source

All returns the v0 roster in stable order.

func ByName

1func ByName(name string) (engine.Fighter, bool)
source

ByName finds a fighter by exact name.

func Names

1func Names() []string
source

Names lists the roster.

Types 3

type Brawler

struct
1type Brawler struct{}
source

Brawler walks straight at the enemy and swings.

Methods on Brawler

func Name

method on Brawler
1func (Brawler) Name() string
source

func Step

method on Brawler
1func (Brawler) Step(v engine.View) engine.Action
source

type Fencer

struct
1type Fencer struct{}
source

Fencer charges on approach, then delivers one heavy poke. It backs off while recharging when the enemy is charged.

Methods on Fencer

func Name

method on Fencer
1func (Fencer) Name() string
source

func Step

method on Fencer
1func (Fencer) Step(v engine.View) engine.Action
source

type Zigzag

struct
1type Zigzag struct{}
source

Zigzag weaves toward the enemy on a staggered line and counterpunches: it defends when the enemy is charged, attacks when adjacent.

Methods on Zigzag

func Name

method on Zigzag
1func (Zigzag) Name() string
source

func Step

method on Zigzag
1func (Zigzag) Step(v engine.View) engine.Action
source

Dependencies

Imports 1

/p/g1ejwp09wwnu6psem2sdwrh7l7xcldqm6zz3vu2v/cagematch/roster/v0

Imported by indexer

Source Files 2