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.DecimalFormat
floatFormat
protected boolean
hijacked
protected MarioCheaterKeyboard
keyboard
protected boolean
renderExtraDebugInfo
-
Constructor Summary
Constructors Constructor Description MarioHijackAIBase()
-
Method Summary
Modifier and Type Method Description MarioInput
actionSelection()
Agent should now perform an action-selection and return actions it wants to perform.MarioInput
actionSelectionAI()
MarioInput
actionSelectionKeyboard()
void
debugDraw(VisualizationComponent vis, LevelScene level, IEnvironment env, java.awt.Graphics g)
void
keyPressed(java.awt.event.KeyEvent e)
void
keyReleased(java.awt.event.KeyEvent e)
void
keyTyped(java.awt.event.KeyEvent e)
protected void
toggleKey(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:IAgent
Agent should now perform an action-selection and return actions it wants to perform.- Specified by:
actionSelection
in interfaceIAgent
- Overrides:
actionSelection
in classMarioAIBase
- Returns:
- Actions to perform
-
actionSelectionAI
-
actionSelectionKeyboard
-
debugDraw
public void debugDraw(VisualizationComponent vis, LevelScene level, IEnvironment env, java.awt.Graphics g)- Specified by:
debugDraw
in interfaceIMarioDebugDraw
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
-
toggleKey
protected void toggleKey(java.awt.event.KeyEvent e, boolean isPressed)
-