Static
Readonly
ACCOUNT_Static
Readonly
MIN_Static
activateSAGE program
the key authorized to run this instruction
the profile with the required permissions for the instruction
the SAGE game id
the game state
input params
Static
copyCreate a new GameState
account from an older one and activates it
This is meant to be used when all we want to do is update the update_id
,
without changing game variables. If game variables are to be changed, then we
need to use other instructions to create and activate a new GameState
account
InstructionReturn
SAGE program
the key authorized to run this instruction
the profile with the required permissions for the instruction
the SAGE game id
the old game state account
the new game state account
input params
Static
decodeStatic
findFind the address of a GameState
account
The PDA and bump respectively
SAGE program
the SAGE game id
the game update id
Static
initCreate a new GameState account
InstructionReturn
SAGE program
the key authorized to run this instruction
the profile with the required permissions for the instruction
the SAGE game id
the game state
input params
Static
updateUpdate GameState
account
InstructionReturn
SAGE program
the key authorized to run this instruction
the profile with the required permissions for the instruction
the SAGE game id
the game state
the index of the key
in the profile permissions
Optional
fleet: UpdateFleetDataInputthe fleet
Optional
levers: AnchorTypeDef<Object, Record<string, never>>the econ levers
Optional
miscVariables: AnchorTypeDef<Object, Record<string, never>>miscellaneous variables
Generated using TypeDoc
Sets a new
GameState
for aGame
& increments theupdate_id
Returns
InstructionReturn