Skip to content

How to use this goap tool to "Run something logical"? #3

@uiosun

Description

@uiosun

When run README.md tutorial is done, i write this code after turorial:

for _, action := range plan {
	switch a := action.(type) {
	case *MyAction:
		fmt.Println(a.Name)
		switch a.Name {
		case "eat":
			// do something
		case "sleep":
			// do something
		}
	}
}

This right? and if i has more action (100+), the code will more long, has more good idea will quick do logical? thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions