I’m trying to have a few Map objects in the state handled by nakama runtime.
within matchInit
const state: INormalGameState = {
label,
emptyTicks: 0,
presences: {},
joinsInProgress: 0,
playing: false,
players: new Map<string, IPlayerState>(),
inputQueues: new Map<string, IMoveInputData[]>(),
coins: new Map<string, ICoinState>(),
nextCoinGenIndex: 0,
};
When I try to call map methods such as set, delete in any of the other match methods I’m getting Object has no member ‘set’ | ‘delete’
I guess Nakama is converting the data.
Is there a workaround for this. Is my approach right?
Please suggest