Package ch.idsia.agents.controllers
Class MarioHijackAIBase
java.lang.Object
ch.idsia.agents.controllers.MarioAgentBase
ch.idsia.agents.controllers.MarioAIBase
ch.idsia.agents.controllers.MarioHijackAIBase
- All Implemented Interfaces:
IMarioDebugDraw,IAgent,java.awt.event.KeyListener,java.util.EventListener
- Direct Known Subclasses:
MarioAgent
public class MarioHijackAIBase extends MarioAIBase implements java.awt.event.KeyListener, IMarioDebugDraw
Splits
actionSelection() into actionSelectionAI() done by AGENT
and actionSelectionKeyboard() done by keyboard.-
Field Summary
Fields Modifier and Type Field Description protected java.text.DecimalFormatfloatFormatprotected booleanhijackedprotected MarioCheaterKeyboardkeyboardprotected booleanrenderExtraDebugInfo -
Constructor Summary
Constructors Constructor Description MarioHijackAIBase() -
Method Summary
Modifier and Type Method Description MarioInputactionSelection()Agent should now perform an action-selection and return actions it wants to perform.MarioInputactionSelectionAI()MarioInputactionSelectionKeyboard()voiddebugDraw(VisualizationComponent vis, LevelScene level, IEnvironment env, java.awt.Graphics g)voidkeyPressed(java.awt.event.KeyEvent e)voidkeyReleased(java.awt.event.KeyEvent e)voidkeyTyped(java.awt.event.KeyEvent e)protected voidtoggleKey(java.awt.event.KeyEvent e, boolean isPressed)
-
Field Details
-
keyboard
-
hijacked
protected boolean hijacked -
floatFormat
protected java.text.DecimalFormat floatFormat -
renderExtraDebugInfo
protected boolean renderExtraDebugInfo
-
-
Constructor Details
-
MarioHijackAIBase
public MarioHijackAIBase()
-
-
Method Details
-
actionSelection
Description copied from interface:IAgentAgent should now perform an action-selection and return actions it wants to perform.- Specified by:
actionSelectionin interfaceIAgent- Overrides:
actionSelectionin classMarioAIBase- Returns:
- Actions to perform
-
actionSelectionAI
-
actionSelectionKeyboard
-
debugDraw
public void debugDraw(VisualizationComponent vis, LevelScene level, IEnvironment env, java.awt.Graphics g)- Specified by:
debugDrawin interfaceIMarioDebugDraw
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)- Specified by:
keyTypedin interfacejava.awt.event.KeyListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)- Specified by:
keyPressedin interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)- Specified by:
keyReleasedin interfacejava.awt.event.KeyListener
-
toggleKey
protected void toggleKey(java.awt.event.KeyEvent e, boolean isPressed)
-