Class Choice

java.lang.Object
edu.uky.cs.nil.tt.io.Message
edu.uky.cs.nil.tt.io.Choice

public class Choice extends Message
The choice message is sent from an agent to the {edu.uky.cs.nil.tt.Server server} to signal what turn the agent wants to take.
Author:
Stephen G. Ware
  • Field Details

    • index

      public final int index
      The index of a turn from the most recent status update sent to the agent, starting at 0
  • Constructor Details

    • Choice

      public Choice(int index)
      Constructs a choice message for a given choice index.
      Parameters:
      index - the index of the turn from the agent's most recent status update that the agent wants to take
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • verify

      public void verify()
      Description copied from class: Message
      Checks that this message is correctly configured and throws an exception if not. This method should be called soon after the message has been parsed. It should check that all the necessary fields are set and that their values are legal values.
      Specified by:
      verify in class Message