Class NotInGame
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.communication.NotInGame
-
public class NotInGame extends java.lang.Object
Message from game to bot, before game is started.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NotInGame.Type
Type of a NotInGame message.
-
Constructor Summary
Constructors Constructor Description NotInGame(NotInGame.Type type)
Creates a NotInGame message from a message type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NotInGame
deserialize(org.json.JSONObject json)
deserializes a NotInGame message from jsonboolean
isDiscovery()
message kind is discoveryboolean
isGameRequest()
message kind is game requestjava.lang.String
toString()
-
-
-
Constructor Detail
-
NotInGame
public NotInGame(NotInGame.Type type)
Creates a NotInGame message from a message type.- Parameters:
type
- type of the message
-
-
Method Detail
-
isDiscovery
public boolean isDiscovery()
message kind is discovery- Returns:
- is discovery
-
isGameRequest
public boolean isGameRequest()
message kind is game request- Returns:
- is game request
-
deserialize
public static NotInGame deserialize(org.json.JSONObject json) throws org.apache.commons.cli.ParseException
deserializes a NotInGame message from json- Parameters:
json
- json data- Returns:
- deserialized message
- Throws:
org.apache.commons.cli.ParseException
- if the message was invalid
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-