cond

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package cond defines conditions for statements of the yack language.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Actor string
}

func (*Actor) IsFulfilled

func (c *Actor) IsFulfilled(ctx Context) bool

func (*Actor) String

func (c *Actor) String() string

type Code

type Code struct {
	Code string
}

func (*Code) IsFulfilled

func (c *Code) IsFulfilled(ctx Context) bool

func (*Code) String

func (c *Code) String() string

type Condition

type Condition interface {
	IsFulfilled(ctx Context) bool
	String() string
}

Condition is a condition to guard statement in a dialog script.

type Context

type Context interface {
	IsActor(actor string) bool
	IsCodeTrue(code string) bool
	IsOnce() bool
	IsShowOnce() bool
	IsOnceEver() bool
	IsShowOnceEver() bool
	IsTempOnce() bool
}

type Once

type Once struct{}

func (*Once) IsFulfilled

func (c *Once) IsFulfilled(ctx Context) bool

func (*Once) String

func (c *Once) String() string

type OnceEver

type OnceEver struct{}

func (*OnceEver) IsFulfilled

func (c *OnceEver) IsFulfilled(ctx Context) bool

func (*OnceEver) String

func (c *OnceEver) String() string

type ShowOnce

type ShowOnce struct{}

func (*ShowOnce) IsFulfilled

func (c *ShowOnce) IsFulfilled(ctx Context) bool

func (*ShowOnce) String

func (c *ShowOnce) String() string

type ShowOnceEver

type ShowOnceEver struct{}

func (*ShowOnceEver) IsFulfilled

func (c *ShowOnceEver) IsFulfilled(ctx Context) bool

func (*ShowOnceEver) String

func (c *ShowOnceEver) String() string

type TempOnce

type TempOnce struct{}

func (*TempOnce) IsFulfilled

func (c *TempOnce) IsFulfilled(ctx Context) bool

func (*TempOnce) String

func (c *TempOnce) String() string

Jump to

Keyboard shortcuts

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