Package com.kraken.api.simulation
Class SimulationScenario
- java.lang.Object
-
- com.kraken.api.simulation.SimulationScenario
-
public final class SimulationScenario extends java.lang.ObjectInput bundle for simulation tree generation.
-
-
Constructor Summary
Constructors Constructor Description SimulationScenario(@NonNull SimulationSnapshot snapshot, java.util.Map<java.lang.Integer,SimulationNpcProfile> npcProfilesById)Creates a scenario from a snapshot and npc-id profile mapping.SimulationScenario(@NonNull SimulationSnapshot snapshot, java.util.Map<java.lang.Integer,SimulationNpcProfile> npcProfilesById, SimulationNpcProfile defaultNpcProfile)Creates a scenario from a snapshot and npc-id profile mapping.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimulationNpcProfileresolveNpcProfile(int npcId)Resolves an NPC profile for an npc id.
-
-
-
Constructor Detail
-
SimulationScenario
public SimulationScenario(@NonNull @NonNull SimulationSnapshot snapshot, java.util.Map<java.lang.Integer,SimulationNpcProfile> npcProfilesById)Creates a scenario from a snapshot and npc-id profile mapping.- Parameters:
snapshot- immutable snapshot of player, npcs, and collision.npcProfilesById- mapping keyed by npc id.
-
SimulationScenario
public SimulationScenario(@NonNull @NonNull SimulationSnapshot snapshot, java.util.Map<java.lang.Integer,SimulationNpcProfile> npcProfilesById, SimulationNpcProfile defaultNpcProfile)Creates a scenario from a snapshot and npc-id profile mapping.- Parameters:
snapshot- immutable snapshot of player, npcs, and collision.npcProfilesById- mapping keyed by npc id.defaultNpcProfile- fallback profile when a mapping is missing.
-
-
Method Detail
-
resolveNpcProfile
public SimulationNpcProfile resolveNpcProfile(int npcId)
Resolves an NPC profile for an npc id.- Parameters:
npcId- npc id.- Returns:
- resolved profile.
-
-