public class Simulator extends java.lang.Object
|Constructor and Description|
The class constructor that creates an instance of the Simulator class by using an instance of the GameData class.
|Modifier and Type||Method and Description|
Simulates the progression of a fight starting from a given
Note that when the character is on ground, all AIR actions will be considered invalid by the simulator.
public Simulator(GameData gameData)
gameData- an instance of the GameData class
public FrameData simulate(FrameData frameData, boolean playerNumber, java.util.Deque<Action> myAct, java.util.Deque<Action> oppAct, int simulationLimit)
FrameDatainstance and executing specified actions for both players.
FrameDatais returned, and can be used to assess the outcome of the simulation.
frameData- frame data at the start of simulation
playerNumber- boolean value which identifies P1/P2.
trueif the player is P1, or
myAct- actions to be performed by the player identified by the parameter `player`
oppAct- actions to be performed by the opponent of the player identified by the parameter `player`
simulationLimit- the number of frames to be simulated.