public class Simulator
extends java.lang.Object
Constructor and Description |
---|
Simulator(GameData gameData)
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 |
---|---|
FrameData |
simulate(FrameData frameData,
boolean playerNumber,
java.util.Deque<Action> myAct,
java.util.Deque<Action> oppAct,
int simulationLimit)
Simulates the progression of a fight starting from a given
FrameData instance and executing specified actions for both
players.The resulting FrameData is returned, and can be used to assess
the outcome of the simulation.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 classpublic FrameData simulate(FrameData frameData, boolean playerNumber, java.util.Deque<Action> myAct, java.util.Deque<Action> oppAct, int simulationLimit)
FrameData
instance and executing specified actions for both
players.FrameData
is returned, and can be used to assess
the outcome of the simulation.frameData
- frame data at the start of simulationplayerNumber
- boolean value which identifies P1/P2. true
if the
player is P1, or false
if P2.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.