diplomacy.daide.notifications¶
DAIDE Notifications - Contains a list of responses sent by the server to the client
-
class
diplomacy.daide.notifications.
DaideNotification
(**kwargs)[source]¶ Bases:
object
Represents a DAIDE response.
-
class
diplomacy.daide.notifications.
MapNameNotification
(map_name, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a MAP DAIDE response. Sends the name of the current map to the client.
Syntax:
MAP ('name')
-
class
diplomacy.daide.notifications.
HelloNotification
(power_name, passcode, level, deadline, rules, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a HLO DAIDE response. Sends the power to be played by the client with the passcode to rejoin the game and the details of the game.
Syntax:
HLO (power) (passcode) (variant) (variant) ...
Variant syntax:
LVL n # Level of the syntax accepted MTL seconds # Movement time limit RTL seconds # Retreat time limit BTL seconds # Build time limit DSD # Disables the time limit when a client disconects AOA # Any orders accepted
LVL 10:
Variant syntax:
PDA # Accept partial draws NPR # No press during retreat phases NPB # No press during build phases PTL seconds # Press time limit
-
__init__
(power_name, passcode, level, deadline, rules, **kwargs)[source]¶ Builds the response
Parameters: - power_name – The name of the power being played.
- passcode – Integer. A passcode to rejoin the game.
- level – Integer. The daide syntax level of the game
- deadline – Integer. The number of seconds per turn (0 to disable)
- rules – The list of game rules.
-
-
class
diplomacy.daide.notifications.
SupplyCenterNotification
(powers_centers, map_name, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a SCO DAIDE notification. Sends the current supply centre ownership.
Syntax:
SCO (power centre centre ...) (power centre centre ...) ...
-
class
diplomacy.daide.notifications.
CurrentPositionNotification
(phase_name, powers_units, powers_retreats, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a NOW DAIDE notification. Sends the current turn, and the current unit positions.
Syntax:
NOW (turn) (unit) (unit) ...
Unit syntax:
power unit_type province power unit_type province MRT (province province ...)
-
class
diplomacy.daide.notifications.
MissingOrdersNotification
(phase_name, power, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a MIS DAIDE response. Sends the list of unit for which an order is missing or indication about required disbands or builds.
Syntax:
MIS (unit) (unit) ... MIS (unit MRT (province province ...)) (unit MRT (province province ...)) ... MIS (number)
-
class
diplomacy.daide.notifications.
OrderResultNotification
(phase_name, order_bytes, results, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a ORD DAIDE response. Sends the result of an order after the turn has been processed.
Syntax:
ORD (turn) (order) (result) ORD (turn) (order) (result RET)
Result syntax:
SUC # Order succeeded (can apply to any order). BNC # Move bounced (only for MTO, CTO or RTO orders). CUT # Support cut (only for SUP orders). DSR # Move via convoy failed due to dislodged convoying fleet (only for CTO orders). NSO # No such order (only for SUP, CVY or CTO orders). RET # Unit was dislodged and must retreat.
-
class
diplomacy.daide.notifications.
TimeToDeadlineNotification
(seconds, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a TME DAIDE response. Sends the time to the next deadline.
Syntax:
TME (seconds)
-
class
diplomacy.daide.notifications.
PowerInCivilDisorderNotification
(power_name, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a CCD DAIDE response. Sends the name of the power in civil disorder.
Syntax:
CCD (power)
-
class
diplomacy.daide.notifications.
PowerIsEliminatedNotification
(power_name, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a OUT DAIDE response. Sends the name of the power eliminated.
Syntax:
OUT (power)
-
class
diplomacy.daide.notifications.
DrawNotification
(**kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a DRW DAIDE response. Indicates that the game has ended due to a draw
Syntax:
DRW
-
class
diplomacy.daide.notifications.
MessageFromNotification
(from_power_name, to_power_names, message, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a FRM DAIDE response. Indicates that the game has ended due to a draw
Syntax:
FRM (power) (power power ...) (press_message) FRM (power) (power power ...) (reply)
-
class
diplomacy.daide.notifications.
SoloNotification
(power_name, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a SLO DAIDE response. Indicates that the game has ended due to a solo by the specified power
Syntax:
SLO (power)
-
class
diplomacy.daide.notifications.
SummaryNotification
(phase_name, powers, daide_users, years_of_elimination, **kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents a SMR DAIDE response. Sends the summary for each power at the end of the game
Syntax:
SMR (turn) (power_summary) ...
power_summary syntax:
power ('name') ('version') number_of_centres power ('name') ('version') number_of_centres year_of_elimination
-
class
diplomacy.daide.notifications.
TurnOffNotification
(**kwargs)[source]¶ Bases:
diplomacy.daide.notifications.DaideNotification
Represents an OFF DAIDE response. Requests a client to exit
Syntax:
OFF
-
diplomacy.daide.notifications.
MAP
¶
-
diplomacy.daide.notifications.
HLO
¶
-
diplomacy.daide.notifications.
SCO
¶ alias of
diplomacy.daide.notifications.SupplyCenterNotification
-
diplomacy.daide.notifications.
NOW
¶ alias of
diplomacy.daide.notifications.CurrentPositionNotification
-
diplomacy.daide.notifications.
MIS
¶ alias of
diplomacy.daide.notifications.MissingOrdersNotification
-
diplomacy.daide.notifications.
ORD
¶ alias of
diplomacy.daide.notifications.OrderResultNotification
-
diplomacy.daide.notifications.
TME
¶ alias of
diplomacy.daide.notifications.TimeToDeadlineNotification
-
diplomacy.daide.notifications.
CCD
¶ alias of
diplomacy.daide.notifications.PowerInCivilDisorderNotification
-
diplomacy.daide.notifications.
OUT
¶ alias of
diplomacy.daide.notifications.PowerIsEliminatedNotification
-
diplomacy.daide.notifications.
DRW
¶
-
diplomacy.daide.notifications.
FRM
¶ alias of
diplomacy.daide.notifications.MessageFromNotification
-
diplomacy.daide.notifications.
SLO
¶
-
diplomacy.daide.notifications.
SMR
¶
-
diplomacy.daide.notifications.
OFF
¶