checker

package
v0.0.0-...-f49f44b Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowToReroll

func AllowToReroll(parentAction string) bool

func CheckActionTriggered

func CheckActionTriggered(action string, parentAction string, actionToTaskIdMap map[string]string) (taskId string, err error)

* check whether the action is already triggered or not * action: user input action * actionToTaskIdMap: taskId map for actions, key is action, value is taskId

func CreateActionToTaskIdMap

func CreateActionToTaskIdMap(actions []string) map[string]string

* create an empty map for action to taskId, used to record triggered taskId

func GetActions

func GetActions(parentAction, action, panState string) ([]string, string)

* get available action list * panState: verticle if pan up/down was executed in history, horizontal if pan left/right was executed, cleared at outpaint action

func GetAvailableActionsFromMap

func GetAvailableActionsFromMap(parentAction string, actionToTaskIdMap map[string]string) (actions []string)

func ParseInput

func ParseInput(input string) (taskId string, action string)

func RunActionCheckerExample

func RunActionCheckerExample()

Types

type TaskRuntime

type TaskRuntime struct {
	TaskId     string
	PanState   string
	Action     string
	ActionTree map[string]string
}

simplified TaskRuntime for example

Jump to

Keyboard shortcuts

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