Package behaviors
Class Drawing
java.lang.Object
behaviors.Drawing
- All Implemented Interfaces:
lejos.robotics.subsumption.Behavior
Draws either a piece of the hangman or (a) character(s) depending on the given guess.
- Since:
- 2023
-
Constructor Summary
ConstructorDescriptionDrawing()
The constructor of drawing initializes all variables that require an initial value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
action()
Sends a state packet to the server and then gets the current guess.With the current guess it then draws either a piece of hangman or the character based on the correctness of it.void
suppress()
Suppress function does nothing here.boolean
Takes control when the state is equal to the DRAWING state.
-
Constructor Details
-
Drawing
public Drawing()The constructor of drawing initializes all variables that require an initial value.
-
-
Method Details
-
action
public void action()Sends a state packet to the server and then gets the current guess.With the current guess it then draws either a piece of hangman or the character based on the correctness of it.- Specified by:
action
in interfacelejos.robotics.subsumption.Behavior
-
suppress
public void suppress()Suppress function does nothing here.- Specified by:
suppress
in interfacelejos.robotics.subsumption.Behavior
-
takeControl
public boolean takeControl()Takes control when the state is equal to the DRAWING state.- Specified by:
takeControl
in interfacelejos.robotics.subsumption.Behavior
- Returns:
- boolean
-