Package behaviors

Class Drawing

java.lang.Object
behaviors.Drawing
All Implemented Interfaces:
lejos.robotics.subsumption.Behavior

public class Drawing extends Object implements lejos.robotics.subsumption.Behavior
Draws either a piece of the hangman or (a) character(s) depending on the given guess.
Since:
2023
  • Constructor Summary

    Constructors
    Constructor
    Description
    The constructor of drawing initializes all variables that require an initial value.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 function does nothing here.
    boolean
    Takes control when the state is equal to the DRAWING state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface lejos.robotics.subsumption.Behavior
    • suppress

      public void suppress()
      Suppress function does nothing here.
      Specified by:
      suppress in interface lejos.robotics.subsumption.Behavior
    • takeControl

      public boolean takeControl()
      Takes control when the state is equal to the DRAWING state.
      Specified by:
      takeControl in interface lejos.robotics.subsumption.Behavior
      Returns:
      boolean