boardgame.io icon indicating copy to clipboard operation
boardgame.io copied to clipboard

enumerate function parameters

Open mancioshell opened this issue 2 years ago • 2 comments

Hi, I have create a game with a custom plugin.

enumerate function of ai section of game should have G and ctx as parameters. Unfortunately ctx param of enumerate function does not have ctx['plugin-name']

Is it an issue?

mancioshell avatar Jun 16 '22 07:06 mancioshell

Do you mean that it is missing the Typescript type or do you get an error when accessing the custom plug-in?

It is possible we only add plugins to ctx before calling moves in AI but after enumerate — I don't quite remember off the top of my head.

delucis avatar Jun 16 '22 09:06 delucis

Do you mean that it is missing the Typescript type or do you get an error when accessing the custom plug-in?

It is possible we only add plugins to ctx before calling moves in AI but after enumerate — I don't quite remember off the top of my head.

I mean i have got an error because ctx['plugin-name'] is undefined.

mancioshell avatar Jun 16 '22 11:06 mancioshell