public interface AIInterface
Modifier and Type | Method and Description |
---|---|
void |
close()
Finalizes AI.
It runs only once at the end of each game. |
default void |
getAudioData(AudioData ad)
Gets the audio information in each frame.
For more details on the data structure, please see https://tinyurl.com/DareFightingICE/AI. |
void |
getInformation(FrameData fd) |
default void |
getInformation(FrameData fd,
boolean isControl)
Gets information from the game status in each frame.
|
default void |
getScreenData(ScreenData sd)
Gets the screen information in each frame.
|
int |
initialize(GameData gd,
boolean playerNumber)
This method initializes AI, and it will be executed only once in the
beginning of each game.
|
Key |
input()
Receives a key input from AI.
It is executed in each frame and returns a value in the Key type. |
void |
processing()
Processes the data from AI.
|
void |
roundEnd(int p1Hp,
int p2Hp,
int frames)
Informs the result of each round.
It is called when each round ends. |
int initialize(GameData gd, boolean playerNumber)
gd
- the data that will not be changed during a gameplayerNumber
- the character's side flag.true
if the character is P1, or false
if P2.GameData
default void getInformation(FrameData fd, boolean isControl)
frameData.getRemainingTime()
returns a negative value, the
current round has not started yet. !frameData.getEmptyFlag() && frameData.getRemainingTime() > 0
holds; otherwise, NullPointerException will occur. fd
- the data that will be changed each frameisControl
- whether the character can act. this parameter is not delayed
unlike CharacterData.isControl()
FrameData
void getInformation(FrameData fd)
void processing()
Key input()
Key
void close()
void roundEnd(int p1Hp, int p2Hp, int frames)
p1Hp
- P1's remaining HPp2Hp
- P2's remaining HPframes
- the elapsed frames from the start to the end of the rounddefault void getScreenData(ScreenData sd)
sd
- the screen information such as the pixel data, it will be empty in blind mode.default void getAudioData(AudioData ad)
ad
- the audio information.