diplomacy 1.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. diplomacy/README_COMMANDS.txt +56 -0
  2. diplomacy/README_MAPS.txt +248 -0
  3. diplomacy/README_RULES.txt +250 -0
  4. diplomacy/__init__.py +47 -0
  5. diplomacy/client/__init__.py +16 -0
  6. diplomacy/client/channel.py +184 -0
  7. diplomacy/client/connection.py +548 -0
  8. diplomacy/client/game_instances_set.py +84 -0
  9. diplomacy/client/network_game.py +202 -0
  10. diplomacy/client/notification_managers.py +286 -0
  11. diplomacy/client/response_managers.py +365 -0
  12. diplomacy/communication/__init__.py +16 -0
  13. diplomacy/communication/notifications.py +316 -0
  14. diplomacy/communication/requests.py +868 -0
  15. diplomacy/communication/responses.py +293 -0
  16. diplomacy/daide/__init__.py +18 -0
  17. diplomacy/daide/clauses.py +828 -0
  18. diplomacy/daide/connection_handler.py +205 -0
  19. diplomacy/daide/messages.py +240 -0
  20. diplomacy/daide/notification_managers.py +198 -0
  21. diplomacy/daide/notifications.py +492 -0
  22. diplomacy/daide/request_managers.py +655 -0
  23. diplomacy/daide/requests.py +829 -0
  24. diplomacy/daide/responses.py +862 -0
  25. diplomacy/daide/server.py +75 -0
  26. diplomacy/daide/tests/__init__.py +16 -0
  27. diplomacy/daide/tests/game_data_1.csv +1139 -0
  28. diplomacy/daide/tests/game_data_1_history.csv +1215 -0
  29. diplomacy/daide/tests/game_data_1_reject_map.csv +7 -0
  30. diplomacy/daide/tests/game_data_7.csv +4448 -0
  31. diplomacy/daide/tests/game_data_7_draw.csv +2560 -0
  32. diplomacy/daide/tests/game_data_7_press.csv +2909 -0
  33. diplomacy/daide/tests/test_daide_game.py +479 -0
  34. diplomacy/daide/tests/test_requests.py +886 -0
  35. diplomacy/daide/tests/test_responses.py +339 -0
  36. diplomacy/daide/tests/test_tokens.py +268 -0
  37. diplomacy/daide/tokens.py +440 -0
  38. diplomacy/daide/utils.py +75 -0
  39. diplomacy/engine/__init__.py +16 -0
  40. diplomacy/engine/game.py +4551 -0
  41. diplomacy/engine/map.py +1453 -0
  42. diplomacy/engine/message.py +121 -0
  43. diplomacy/engine/power.py +406 -0
  44. diplomacy/engine/renderer.py +900 -0
  45. diplomacy/integration/__init__.py +19 -0
  46. diplomacy/integration/base_api.py +69 -0
  47. diplomacy/integration/webdiplomacy_net/__init__.py +17 -0
  48. diplomacy/integration/webdiplomacy_net/api.py +281 -0
  49. diplomacy/integration/webdiplomacy_net/game.py +336 -0
  50. diplomacy/integration/webdiplomacy_net/orders.py +676 -0
  51. diplomacy/integration/webdiplomacy_net/tests/__init__.py +16 -0
  52. diplomacy/integration/webdiplomacy_net/tests/test_game.py +185 -0
  53. diplomacy/integration/webdiplomacy_net/tests/test_orders.py +442 -0
  54. diplomacy/integration/webdiplomacy_net/utils.py +75 -0
  55. diplomacy/maps/__init__.py +16 -0
  56. diplomacy/maps/ancmed.map +190 -0
  57. diplomacy/maps/ancmed_age_of_empires.map +24 -0
  58. diplomacy/maps/colonial.map +299 -0
  59. diplomacy/maps/convoy_paths_cache.pkl +0 -0
  60. diplomacy/maps/empire.map +410 -0
  61. diplomacy/maps/known_world_901.map +710 -0
  62. diplomacy/maps/modern.map +351 -0
  63. diplomacy/maps/pure.map +38 -0
  64. diplomacy/maps/standard.map +213 -0
  65. diplomacy/maps/standard_age_of_empires.map +28 -0
  66. diplomacy/maps/standard_age_of_empires_2.map +28 -0
  67. diplomacy/maps/standard_fleet_rome.map +41 -0
  68. diplomacy/maps/standard_france_austria.map +6 -0
  69. diplomacy/maps/standard_germany_italy.map +6 -0
  70. diplomacy/maps/svg/ancmed.svg +950 -0
  71. diplomacy/maps/svg/modern.svg +1441 -0
  72. diplomacy/maps/svg/pure.svg +436 -0
  73. diplomacy/maps/svg/standard.svg +943 -0
  74. diplomacy/maps/svg/svg.dtd +1846 -0
  75. diplomacy/maps/tests/__init__.py +16 -0
  76. diplomacy/maps/tests/test_map_gen.py +64 -0
  77. diplomacy/maps/world.map +520 -0
  78. diplomacy/server/__init__.py +16 -0
  79. diplomacy/server/connection_handler.py +135 -0
  80. diplomacy/server/notifier.py +359 -0
  81. diplomacy/server/request_manager_utils.py +291 -0
  82. diplomacy/server/request_managers.py +1263 -0
  83. diplomacy/server/run.py +47 -0
  84. diplomacy/server/scheduler.py +274 -0
  85. diplomacy/server/server.py +932 -0
  86. diplomacy/server/server_game.py +507 -0
  87. diplomacy/server/user.py +52 -0
  88. diplomacy/server/users.py +249 -0
  89. diplomacy/settings.py +24 -0
  90. diplomacy/tests/__init__.py +16 -0
  91. diplomacy/tests/network/1.json +1 -0
  92. diplomacy/tests/network/2.json +1 -0
  93. diplomacy/tests/network/3.json +1 -0
  94. diplomacy/tests/network/__init__.py +16 -0
  95. diplomacy/tests/network/run_real_game.py +82 -0
  96. diplomacy/tests/network/test_real_game.py +630 -0
  97. diplomacy/tests/test_datc.py +5467 -0
  98. diplomacy/tests/test_datc_no_check.py +106 -0
  99. diplomacy/tests/test_datc_no_expand.py +95 -0
  100. diplomacy/tests/test_default_orders.py +88 -0
  101. diplomacy/tests/test_game.py +731 -0
  102. diplomacy/tests/test_map.py +238 -0
  103. diplomacy/tests/test_pytest.py +23 -0
  104. diplomacy/tests/test_renderer.py +317 -0
  105. diplomacy/tests/test_response_managers.py +78 -0
  106. diplomacy/tests/test_server_run.py +105 -0
  107. diplomacy/utils/__init__.py +22 -0
  108. diplomacy/utils/common.py +306 -0
  109. diplomacy/utils/constants.py +60 -0
  110. diplomacy/utils/convoy_paths.py +342 -0
  111. diplomacy/utils/equilateral_triangle.py +180 -0
  112. diplomacy/utils/errors.py +170 -0
  113. diplomacy/utils/exceptions.py +175 -0
  114. diplomacy/utils/export.py +353 -0
  115. diplomacy/utils/game_phase_data.py +47 -0
  116. diplomacy/utils/jsonable.py +150 -0
  117. diplomacy/utils/keywords.py +40 -0
  118. diplomacy/utils/network_data.py +77 -0
  119. diplomacy/utils/order_results.py +61 -0
  120. diplomacy/utils/parsing.py +527 -0
  121. diplomacy/utils/priority_dict.py +109 -0
  122. diplomacy/utils/scheduler_event.py +45 -0
  123. diplomacy/utils/sorted_dict.py +267 -0
  124. diplomacy/utils/sorted_set.py +161 -0
  125. diplomacy/utils/splitter.py +253 -0
  126. diplomacy/utils/strings.py +246 -0
  127. diplomacy/utils/tests/__init__.py +16 -0
  128. diplomacy/utils/tests/test_common.py +147 -0
  129. diplomacy/utils/tests/test_convoy_paths.py +170 -0
  130. diplomacy/utils/tests/test_export.py +122 -0
  131. diplomacy/utils/tests/test_jsonable.py +81 -0
  132. diplomacy/utils/tests/test_jsonable_changes.py +190 -0
  133. diplomacy/utils/tests/test_parsing.py +307 -0
  134. diplomacy/utils/tests/test_priority_dict.py +102 -0
  135. diplomacy/utils/tests/test_sorted_dict.py +154 -0
  136. diplomacy/utils/tests/test_sorted_set.py +168 -0
  137. diplomacy/utils/tests/test_time.py +77 -0
  138. diplomacy/utils/time.py +88 -0
  139. diplomacy/version.py +2 -0
  140. diplomacy/web/.eslintrc +27 -0
  141. diplomacy/web/__init__.py +19 -0
  142. diplomacy/web/babel.config.cjs +6 -0
  143. diplomacy/web/index.html +16 -0
  144. diplomacy/web/jest.config.cjs +8 -0
  145. diplomacy/web/package-lock.json +9679 -0
  146. diplomacy/web/package.json +40 -0
  147. diplomacy/web/public/favicon.ico +0 -0
  148. diplomacy/web/public/manifest.json +15 -0
  149. diplomacy/web/src/diplomacy/client/channel.js +256 -0
  150. diplomacy/web/src/diplomacy/client/connection.js +354 -0
  151. diplomacy/web/src/diplomacy/client/game_instance_set.js +76 -0
  152. diplomacy/web/src/diplomacy/client/network_game.js +297 -0
  153. diplomacy/web/src/diplomacy/client/notification_managers.js +127 -0
  154. diplomacy/web/src/diplomacy/client/request_future_context.js +63 -0
  155. diplomacy/web/src/diplomacy/client/response_managers.js +118 -0
  156. diplomacy/web/src/diplomacy/communication/notifications.js +56 -0
  157. diplomacy/web/src/diplomacy/communication/requests.js +120 -0
  158. diplomacy/web/src/diplomacy/communication/responses.js +42 -0
  159. diplomacy/web/src/diplomacy/engine/game.js +542 -0
  160. diplomacy/web/src/diplomacy/engine/message.js +34 -0
  161. diplomacy/web/src/diplomacy/engine/power.js +129 -0
  162. diplomacy/web/src/diplomacy/maps/ancmed.map +190 -0
  163. diplomacy/web/src/diplomacy/maps/ancmed_age_of_empires.map +24 -0
  164. diplomacy/web/src/diplomacy/maps/colonial.map +299 -0
  165. diplomacy/web/src/diplomacy/maps/empire.map +410 -0
  166. diplomacy/web/src/diplomacy/maps/known_world_901.map +710 -0
  167. diplomacy/web/src/diplomacy/maps/modern.map +351 -0
  168. diplomacy/web/src/diplomacy/maps/pure.map +38 -0
  169. diplomacy/web/src/diplomacy/maps/standard.map +213 -0
  170. diplomacy/web/src/diplomacy/maps/standard_age_of_empires.map +28 -0
  171. diplomacy/web/src/diplomacy/maps/standard_age_of_empires_2.map +28 -0
  172. diplomacy/web/src/diplomacy/maps/standard_fleet_rome.map +41 -0
  173. diplomacy/web/src/diplomacy/maps/standard_france_austria.map +6 -0
  174. diplomacy/web/src/diplomacy/maps/standard_germany_italy.map +6 -0
  175. diplomacy/web/src/diplomacy/maps/svg/ancmed.svg +950 -0
  176. diplomacy/web/src/diplomacy/maps/svg/modern.svg +1441 -0
  177. diplomacy/web/src/diplomacy/maps/svg/pure.svg +436 -0
  178. diplomacy/web/src/diplomacy/maps/svg/standard.svg +943 -0
  179. diplomacy/web/src/diplomacy/maps/svg/svg.dtd +1846 -0
  180. diplomacy/web/src/diplomacy/maps/world.map +520 -0
  181. diplomacy/web/src/diplomacy/utils/diplog.js +45 -0
  182. diplomacy/web/src/diplomacy/utils/future.js +55 -0
  183. diplomacy/web/src/diplomacy/utils/future_event.js +45 -0
  184. diplomacy/web/src/diplomacy/utils/queue.js +71 -0
  185. diplomacy/web/src/diplomacy/utils/sorted_dict.js +118 -0
  186. diplomacy/web/src/diplomacy/utils/strings.js +86 -0
  187. diplomacy/web/src/diplomacy/utils/utils.js +192 -0
  188. diplomacy/web/src/diplomacy/utils/utils.test.js +17 -0
  189. diplomacy/web/src/gui/components/action.jsx +52 -0
  190. diplomacy/web/src/gui/components/button.jsx +68 -0
  191. diplomacy/web/src/gui/components/delete_button.jsx +59 -0
  192. diplomacy/web/src/gui/components/fancyBox.js +47 -0
  193. diplomacy/web/src/gui/components/forms.jsx +116 -0
  194. diplomacy/web/src/gui/components/help.jsx +39 -0
  195. diplomacy/web/src/gui/components/hot_key.jsx +66 -0
  196. diplomacy/web/src/gui/components/layouts.jsx +55 -0
  197. diplomacy/web/src/gui/components/message_view.jsx +67 -0
  198. diplomacy/web/src/gui/components/navigation.jsx +77 -0
  199. diplomacy/web/src/gui/components/page_context.jsx +19 -0
  200. diplomacy/web/src/gui/components/power_orders.jsx +77 -0
  201. diplomacy/web/src/gui/components/power_orders_actions_bar.js +42 -0
  202. diplomacy/web/src/gui/components/tab.jsx +45 -0
  203. diplomacy/web/src/gui/components/table.jsx +112 -0
  204. diplomacy/web/src/gui/components/tabs.jsx +69 -0
  205. diplomacy/web/src/gui/forms/connection_form.jsx +123 -0
  206. diplomacy/web/src/gui/forms/find_form.jsx +70 -0
  207. diplomacy/web/src/gui/forms/join_form.jsx +80 -0
  208. diplomacy/web/src/gui/forms/message_form.jsx +53 -0
  209. diplomacy/web/src/gui/forms/power_order_creation_form.jsx +121 -0
  210. diplomacy/web/src/gui/forms/select_location_form.jsx +43 -0
  211. diplomacy/web/src/gui/forms/select_via_form.jsx +45 -0
  212. diplomacy/web/src/gui/maps/ancmed/SvgAncMed.css +19 -0
  213. diplomacy/web/src/gui/maps/ancmed/SvgAncMed.js +20 -0
  214. diplomacy/web/src/gui/maps/ancmed/SvgAncMedMetadata.js +21 -0
  215. diplomacy/web/src/gui/maps/common/build.js +57 -0
  216. diplomacy/web/src/gui/maps/common/common.js +83 -0
  217. diplomacy/web/src/gui/maps/common/convoy.js +103 -0
  218. diplomacy/web/src/gui/maps/common/disband.js +47 -0
  219. diplomacy/web/src/gui/maps/common/equilateralTriangle.js +122 -0
  220. diplomacy/web/src/gui/maps/common/hold.js +47 -0
  221. diplomacy/web/src/gui/maps/common/move.js +67 -0
  222. diplomacy/web/src/gui/maps/common/supportHold.js +72 -0
  223. diplomacy/web/src/gui/maps/common/supportMove.js +61 -0
  224. diplomacy/web/src/gui/maps/common/unit.js +50 -0
  225. diplomacy/web/src/gui/maps/modern/SvgModern.css +19 -0
  226. diplomacy/web/src/gui/maps/modern/SvgModern.js +20 -0
  227. diplomacy/web/src/gui/maps/modern/SvgModernMetadata.js +21 -0
  228. diplomacy/web/src/gui/maps/pure/SvgPure.css +19 -0
  229. diplomacy/web/src/gui/maps/pure/SvgPure.js +20 -0
  230. diplomacy/web/src/gui/maps/pure/SvgPureMetadata.js +21 -0
  231. diplomacy/web/src/gui/maps/standard/SvgStandard.css +19 -0
  232. diplomacy/web/src/gui/maps/standard/SvgStandard.js +20 -0
  233. diplomacy/web/src/gui/maps/standard/SvgStandardMetadata.js +21 -0
  234. diplomacy/web/src/gui/pages/content_connection.jsx +99 -0
  235. diplomacy/web/src/gui/pages/content_game.jsx +1403 -0
  236. diplomacy/web/src/gui/pages/content_games.jsx +167 -0
  237. diplomacy/web/src/gui/pages/page.jsx +376 -0
  238. diplomacy/web/src/gui/pages/page.test.jsx +37 -0
  239. diplomacy/web/src/gui/shortcuts.test.jsx +193 -0
  240. diplomacy/web/src/gui/utils/dipStorage.jsx +140 -0
  241. diplomacy/web/src/gui/utils/inline_game_view.jsx +163 -0
  242. diplomacy/web/src/gui/utils/load_game_from_disk.js +200 -0
  243. diplomacy/web/src/gui/utils/load_game_from_disk.test.js +235 -0
  244. diplomacy/web/src/gui/utils/map_data.js +100 -0
  245. diplomacy/web/src/gui/utils/order.js +24 -0
  246. diplomacy/web/src/gui/utils/order_building.js +211 -0
  247. diplomacy/web/src/gui/utils/power_view.jsx +65 -0
  248. diplomacy/web/src/gui/utils/province.js +135 -0
  249. diplomacy/web/src/gui/utils/saveGameToDisk.js +34 -0
  250. diplomacy/web/src/gui/wizards/gameCreation/gameCreationWizard.css +31 -0
  251. diplomacy/web/src/gui/wizards/gameCreation/gameCreationWizard.js +126 -0
  252. diplomacy/web/src/gui/wizards/gameCreation/mapList.js +63 -0
  253. diplomacy/web/src/gui/wizards/gameCreation/panelChooseMap.js +119 -0
  254. diplomacy/web/src/gui/wizards/gameCreation/panelChoosePlayers.js +83 -0
  255. diplomacy/web/src/gui/wizards/gameCreation/panelChoosePower.js +85 -0
  256. diplomacy/web/src/gui/wizards/gameCreation/panelChooseSettings.js +129 -0
  257. diplomacy/web/src/gui/wizards/gameCreation/panelList.js +22 -0
  258. diplomacy/web/src/index.css +434 -0
  259. diplomacy/web/src/index.js +28 -0
  260. diplomacy/web/svg_to_react.py +820 -0
  261. diplomacy/web/test/assetMock.cjs +1 -0
  262. diplomacy/web/vite.config.mjs +34 -0
  263. diplomacy-1.2.0.dist-info/METADATA +238 -0
  264. diplomacy-1.2.0.dist-info/RECORD +267 -0
  265. diplomacy-1.2.0.dist-info/WHEEL +5 -0
  266. diplomacy-1.2.0.dist-info/licenses/LICENSE +662 -0
  267. diplomacy-1.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,56 @@
1
+ // Comments
2
+ // -----------------------------
3
+ // Order Syntax
4
+ // -----------------------------
5
+ // *** Recommended syntax **
6
+ A LON H
7
+ F IRI - MAO
8
+ A IRI - MAO VIA
9
+ A WAL S F LON
10
+ A WAL S F MAO - IRI
11
+ F NWG C A NWY - EDI
12
+ A IRO R MAO
13
+ A IRO D
14
+ A LON B
15
+ F LIV B
16
+
17
+ // *** Other possible syntax **
18
+ // Hold
19
+ A LON H
20
+ PAR H
21
+
22
+ // Move
23
+ F IRI - MAO
24
+ F IRI - MAO VIA
25
+ IRI - MAO
26
+ IRI - MAO - XXX - YYY - ZZZ
27
+
28
+ // Support
29
+ A WAL S F LON
30
+ WAL S LON
31
+ A WAL S LON
32
+ F WAL S F MAO - IRI
33
+
34
+ // Convoy
35
+ F NWG C A NWY - EDI
36
+ NWG C NWY - EDI
37
+
38
+ // Retreat (Retreat Phase)
39
+ A IRO R MAO
40
+ RETREAT IRO - MAO
41
+ A IRO D
42
+ RETREAT IRO DISBAND
43
+
44
+ // Build
45
+ A LON B
46
+ F LIV B
47
+ BUILD A LON
48
+ BUILD F LIV
49
+
50
+ // Remove
51
+ F LIV D
52
+ REMOVE F LIV
53
+ DISBAND F LIV
54
+
55
+ // Waive
56
+ WAIVE
@@ -0,0 +1,248 @@
1
+ Map File Syntax
2
+ ***************************
3
+
4
+ The engine already supports a number of existing map variants, each of which is implemented
5
+ by a .map file in the format described here.
6
+
7
+ ***************************
8
+ General Directives
9
+ ***************************
10
+
11
+ >>> # comment...
12
+
13
+ Any line that has a pound sign (#) as its first non-whitespace character will be considered
14
+ a comment, and ignored. Comments must span a complete line (that is, you may not add a comment
15
+ to the end of a non-comment line).
16
+
17
+ >>> USE[S] fileName...
18
+
19
+ This line causes another file to be immediately read in. This is used to share map information.
20
+ For example, the britain.map file USES the standard.geography file, which contains all the
21
+ geography for the standard Diplomacy map.
22
+
23
+ >>> MAP mapName
24
+
25
+ This line is identical to USE mapName.map with the additional provision that the graphical
26
+ map template (used to generate the actual visual map) will be the one having the mapName
27
+ specified. For example, the "fleetRome" map not only USEs the same map data (slightly altered)
28
+ as the standard map, but also uses the same graphical map for display (and therefore, the MAP
29
+ command is proper for that variant). By contrast, the "britain" and "crowded" maps may USE
30
+ (that is, load and then alter) the data from the standard map file, but (due to the additional
31
+ SC dots that must be depicted on the map to support these variants), they use different graphical
32
+ maps than does the standard game, so the USE command (rather than MAP) is proper for these variants.
33
+
34
+ ***************************
35
+ Geographic Directives
36
+ ***************************
37
+
38
+ >>> placeName = abbreviation alias...
39
+
40
+ This type of line specifies all the recognized aliases for a map location. The placeName
41
+ is the long form of the map location (the form to appear in results mailings). The abbreviation
42
+ is the engine standard abbreviation for the place-name (the form to appear in all orders when
43
+ shown to the player on his Web pages). This standard abbreviation must be exactly three
44
+ characters long and must both begin and end with an alphabetic or numeric character. Each
45
+ alias is a single word (that is, having no embedded spaces) that is to be recognized as
46
+ another name for the location in question. If you wish to specify an alias that is more
47
+ than a single word in length, you must join the separate words using plus-sign characters (+).
48
+ For example, Norwegian Sea = nwg norwegian nrg norwsea norw+sea
49
+
50
+ If an alias ends with a question-mark (?), it must not contain a plus-sign, and this indicates
51
+ that the alias (without the question-mark) is to be considered "ambiguous." Ambiguous aliases
52
+ may not be used in games that use the NO_CHECK rule (the ambiguity will be reported to the
53
+ player at the time of order-entry). For example, TYR is an ambiguous alias in the standard
54
+ game map, since it is commonly used as an alias for both Tyrolia and the Tyrrhenian Sea.
55
+
56
+ >>> COAST abbreviation [ABUTS [abut...]] -or-
57
+ >>> LAND abbreviation [ABUTS [abut...]] -or-
58
+ >>> WATER abbreviation [ABUTS [abut...]] -or-
59
+ >>> PORT abbreviation [ABUTS [abut...]] -or-
60
+ >>> SHUT abbreviation [ABUTS [abut...]] -or-
61
+
62
+ This type of line specifies the terrain type and adjacencies for the place-name whose
63
+ abbreviation is given. The terrain must be either WATER, LAND, COAST, PORT, or SHUT (impassable).
64
+ The only difference between PORT and COAST spaces is that fleets located in PORT spaces may convoy
65
+ armies as if they were in water.
66
+
67
+ The adjacency information given on this line will silently supplant (become valid instead of) any
68
+ previous such line for the same location. In this way, maps can be changed on the fly, such that
69
+ what was a LAND location can become COAST or WATER and/or can obtain different adjacencies.
70
+
71
+ The abut locations must be the standard abbreviations (the first abbreviation given after
72
+ the equals-sign in each placename line).
73
+
74
+ Specifying Army and Fleet Restrictions
75
+ ===========================
76
+ This directive is case-sensitive. Army and fleet restrictions are specifyied by use of upper- and
77
+ lower-case as described below. Everything must be in upper-case except the following:
78
+
79
+ The abbreviation for any COAST location that a fleet cannot occupy must be listed entirely in
80
+ lowercase. For instance, on the standard map, Spain must be listed as spa since fleets may only
81
+ occupy either SPA/SC or SPA/NC. Specifying a location using lower-case after the same location
82
+ was given earlier using upper-case, or vice-versa, will cause the previous location's terrain type
83
+ and adjacencies to be forgotten.
84
+
85
+ In the list of adjacencies, any location that a fleet could occupy but into which a fleet cannot
86
+ move from the location in question must be listed entirely in lowercase. For example, on the standard
87
+ map, Tuscany must be listed as tus in the list of locations adjacent to VEN, since a fleet cannot
88
+ move directly from Venice to Tuscany.
89
+
90
+ In the list of adjacencies, any LAND or COAST location to which an army cannot make a direct
91
+ (non-convoyed) move from the location in question must be listed with its first character in uppercase
92
+ and the remainder in lower-case. This is useful to specify offshore islands, and therefore no example
93
+ on the standard map can be given. Consider, however, allowing an army to be convoyed into the
94
+ Tyrrhenian Sea (call it Sicily). To implement this, the Tyrrhenian Sea would be given the terrain type
95
+ PORT (to allow both fleets and armies to occupy the space and to allow fleets in that space to convoy)
96
+ and all land spaces adjacent to the Tyrrhenian Sea would list their adjacency to that space as Tys
97
+ (rather than TYS or tys) to indicate than an army may not move directly to the space despite the fact
98
+ that movement from a COAST (such as Naples) to an adjacent PORT (the Tyrrhenian) would otherwise be
99
+ allowed. Convoyed movement would be allowed, though, so an order such as A Nap-ION-TYS would be perfectly
100
+ valid.
101
+
102
+ Specifying Multi-Coast Spaces
103
+ ===========================
104
+ If an area abuts a multi-coast province, its adjacencies must list only the coasts that are reachable,
105
+ and must not list the main space itself (for example, RUM is listed as being adjacent to BUL/EC, but
106
+ not to BUL itself).
107
+
108
+ The line for every coast of a province should appear in the map file before the line for the space
109
+ itself.
110
+
111
+ If the map will undergo terrain changes during play, it is important to note that the fleet-friendly
112
+ space listed last is the one on which a unit in that space will be put if a terrain modification
113
+ requires it. For example, if a fleet is in Rome when Venice becomes a WATER space, the map file will
114
+ need to direct that Rome becomes a multi-coast province by adding entries for ROM/EC, ROM/WC, and rom.
115
+ By listing ROM/WC after ROM/EC, the fleet in Rome will be placed on the west (rather than the east) coast.
116
+
117
+ >>> DROP abbreviation...
118
+
119
+ This line will remove all data that was given concerning the place(s) with the specified
120
+ abbreviation(s), including all adjacency information. That is, all record of the space will be
121
+ forgotten, and no space will be left thinking that it is adjacent to the DROPped location. DROPping
122
+ a multi-coast space, without designating any particular coast, will also DROP all information for each
123
+ of the coasts. That is, DROP SPA, used on the standard map, will remove all information on Spain, Spain
124
+ (north coast), and Spain (south coast).
125
+
126
+ ***************************
127
+ Political Directives
128
+ ***************************
129
+
130
+ >>> powerName [([ownWord][:[abbrev]])] [center...]
131
+
132
+ This type of line is used to specify a power name, its "ownership word" and single-letter
133
+ abbreviation (for instance, England's ownership word would be "English", and abbreviation would be "E")
134
+ and all centers that serve as the home centers for the power. If the ownWord is omitted, the powerName
135
+ is used for this purpose, and if the abbrev is omitted, the initial letter of the ownWord is used as
136
+ the abbreviation.
137
+
138
+ Any and all leading underscores (_) in a powerName will not be displayed when the power is referred
139
+ to in results and on the graphical map. This is useful to cause powers to alphabetize after others
140
+ (and thus be displayed in a specific order in the results and on the graphical map).
141
+
142
+ A plus-sign (+) appearing anywhere in the powerName indicates that the next character in the name
143
+ is to be displayed in upper-case. Any plus-sign appearing in the ownWord will be displayed as a space.
144
+
145
+ If the center is preceded (immediately, with no intervening space) by a dash (-), the center is
146
+ removed (if possible) from any pre-existing list of home centers for the power, and added to the list
147
+ of unowned supply centers. This allows for locations to lose "home center" status. Factory and partisan
148
+ sites may also be removed in this same manner.
149
+
150
+ Multiple lines for a single powerName may be used to handle long lists of centers.
151
+
152
+ This type of line sets a "current power" such that all following lines (that specify initial owned
153
+ centers and units) will apply to this power (as opposed to any other) until another powerName directive
154
+ is encountered.
155
+
156
+ >>> UNOWNED [center...] -or-
157
+ >>> NEUTRAL [center...] -or-
158
+ >>> CENTERS [center...]
159
+
160
+ This line (all three forms are synonymous) is used to list all unowned supply centers. The
161
+ UNOWNED power differs from others in that all centers listed as UNOWNED may be listed elsewhere
162
+ without error -- they are silently moved to owned status. Additionally, any "current power" is
163
+ forgotten by this line. Again, multiple lines may be used to supply a long list of unowned centers.
164
+ If you remove a center from the list of UNOWNED centers (using a dash before its name), that location
165
+ is no longer a supply center at all. For example, to make Warsaw a non-supply center on the standard
166
+ map, you would need to specify the two lines: "RUSSIA -WAR" and "UNOWNED -WAR" in that order.
167
+
168
+ >>> DUMMY [ALL] -or-
169
+ >>> DUMMY [ALL EXCEPT] powerName... -or-
170
+ >>> DUMMIES ALL -or-
171
+ >>> DUMMIES [ALL EXCEPT] powerName...
172
+
173
+ This indicates that either the current power, or all powers, or only those specified by powerName,
174
+ or again all powers other than those specified, are to be made a DUMMY power in the game. No player
175
+ will take the role of such a power. Such a power can be put into civil disorder using the CD_DUMMIES
176
+ rule.
177
+
178
+ >>> UNPLAYED [ALL] -or-
179
+ >>> UNPLAYED [ALL EXCEPT] powerName...
180
+
181
+ This line removes either the current power, all powers, the specified powerName, or on the
182
+ contrary all powers that are not specified. At the same time all information that had been
183
+ recorded for those powers is removed as well. This directive is useful to create variants for
184
+ a smaller number of players on a specific USEd map. If you remove all powers, you should add
185
+ some new powers afterwards, because a game will not start with less than two powers.
186
+
187
+ ***************************
188
+ Military Directives
189
+ ***************************
190
+
191
+ >>> VICTORY centerCount...
192
+
193
+ Specifies a list of the supply center counts which will determine victory, from the first
194
+ game-year forward (the final listed number is repeated for subsequent years). This line is
195
+ optional; if omitted, the VICTORY criterion is set (for all game-years) to one supply center
196
+ greater than half the number of centers on the map, unless the VICTORY_HOMES rule is used, in
197
+ which case the default is based on the number of home centers.
198
+
199
+ >>> BEGIN season year phaseType
200
+
201
+ Specifies the initial game phase. This line is optional; if it is omitted, the initial
202
+ game phase will be SPRING 1901 MOVEMENT. Only the final BEGIN listed in the map file will
203
+ be used. This allows for map files to USE other map files and then override the start phase.
204
+
205
+ >>> OWNS center...
206
+
207
+ Specifies the list of centers owned by the "current power" at the beginning of the game.
208
+ If not specified, the list of initially owned centers is set to the home centers that were
209
+ listed for the "current power."
210
+
211
+ >>> CENTERS [center...]
212
+
213
+ Same as OWNS, but forgets about any previous OWNS lines. If no center is given, the power
214
+ will start with no centers at all (if not followed by any new OWNS lines that is).
215
+
216
+ >>> INHABITS center...
217
+
218
+ Sets the home centers for this power, overwriting any that are given on the power declaration
219
+ line, including partisan and factory sites.
220
+
221
+ >>> HOME(S) [center...]
222
+
223
+ Same as INHABITS, but forgets about any previous INHABITS lines. If no center is given, the
224
+ power will start with no build sites at all (if not followed by any new INHABITS lines that is).
225
+
226
+ >>> UNITS
227
+
228
+ This line is optional. If given, all units that have been listed as initial units for the
229
+ "current power" are immediately forgotten. This can be used to alter the starting position
230
+ of a power from that given in a USEd file.
231
+
232
+ >>> unit
233
+
234
+ Specifies a unit that the current power owns at the beginning of the game. The unit will
235
+ replace any unit that may have previously been listed as beginning in that same space,
236
+
237
+ ***************************
238
+ Behavioral Directives
239
+ ***************************
240
+ >>> RULE[S] rule...
241
+
242
+ Specifies a rule that will be in effect for all games using this map. For example,
243
+ RULE BUILD_ANY would appear in a map file for the Chaos variant, since that variant allows players
244
+ to build new units in any unoccupied, owned supply center. If this line occurs outside of a
245
+ DIRECTIVE stanza, it will be in effect for all games using this map, regardless of any rules-variant
246
+ (payola, etc.) that the game may use. Note that if any rule name is prepended by exclamation point (!),
247
+ that rule will be turned off if possible, and this will be done after all other RULEs have been
248
+ processed.
@@ -0,0 +1,250 @@
1
+ ! indicates that rule is forbidden
2
+ - indicates that rule will be removed
3
+ = indicates that rule is implied
4
+ + indicates that rule will be added
5
+
6
+ ==================================================================
7
+ ** POWER_CHOICE ** ()
8
+ If this rule is used, players may select an (unspoken for) power to play
9
+ when JOINing the game. (Without this rule, the DPjudge will assign powers
10
+ to all players randomly.)
11
+
12
+ ==================================================================
13
+ ** MULTIPLE_POWERS_PER_PLAYER ** ()
14
+ If this rule is used, each player is allowed to control more than 1 power in the game.
15
+
16
+ ==================================================================
17
+ ** NO_OBSERVATIONS ** ()
18
+ If this rule is used, no observers are allowed for the game. Note that game masters
19
+ can still observe the game as omniscient observers even if this rule is present.
20
+
21
+ ==================================================================
22
+ ** SOLITAIRE ** (+NO_DEADLINE +CD_DUMMIES +ALWAYS_WAIT)
23
+ A SOLITAIRE game is a game where all powers are dummies controlled by
24
+ the Master. This can be used to test a certain scenario or to solve a
25
+ puzzle on the Diplomacy board, such as the Sherlock Holmes riddles published
26
+ in the Diplomatic Pouch Zine. A PRIVACY password will be automatically
27
+ assigned, because these are typically private games. After allowing the
28
+ game to form, all powers will become dummies and the game starts immediately.
29
+ The FORMING phase simply gets skipped. Make sure to have all relevant
30
+ rules in place during preparation or when creating the game.
31
+
32
+ The following rules are automatically included:
33
+ - NO_DEADLINE
34
+ - CD_DUMMIES
35
+ - ALWAYS_WAIT
36
+
37
+ To advance a turn the Master needs to push the Process Turn button
38
+ or send a PROCESS command by e-mail. Use ROLLBACK and ROLLFORWARD to
39
+ undo and redo phases, either by e-mail or from the corresponding
40
+ Results page. Note that the Master CONTROLs all powers, and thus can
41
+ give orders to each of them in a single message.
42
+
43
+ ==================================================================
44
+ ** START_MASTER ** ()
45
+ This rule prevents the game from automatically starting once the last player
46
+ joined. The Master will need to change the game status to active to begin the
47
+ game.
48
+
49
+ ==================================================================
50
+ ** NO_PRESS ** (-PUBLIC_PRESS)
51
+ Press is only allowed to and from the Master. This rule is invalid
52
+ when used with PUBLIC_PRESS or other rules that imply that any type
53
+ of press is allowed.
54
+
55
+ ==================================================================
56
+ ** PUBLIC_PRESS ** (-NO_PRESS)
57
+ Press is only allowed to and from the Master, and broadcast.
58
+ (See the descriptions of the TOUCH_PRESS and REMOTE_PRESS rules for other
59
+ implications of the PUBLIC_PRESS rule.)
60
+
61
+ ==================================================================
62
+ ** DONT_SKIP_PHASES ** ()
63
+ If this rule is used, all phases (including phases where all players need
64
+ to issue blank orders) will be played, and empty phases won't be skipped.
65
+
66
+ ==================================================================
67
+ ** IGNORE_ERRORS ** ()
68
+ Order errors will be silently ignored.
69
+
70
+ ==================================================================
71
+ ** BUILD_ANY ** ()
72
+ Powers may build new units at any owned supply center, not simply at
73
+ their home supply centers.
74
+
75
+ ==================================================================
76
+ ** CIVIL_DISORDER ** (+CD_DUMMIES)
77
+ Any power that has not submitted orders:
78
+
79
+ - when the game's Master submits a PROCESS command, or
80
+
81
+ - when the deadline has passed (or, if a grace period is
82
+ specified in the TIMING line of the game's
83
+ status file, after the expiration of
84
+ the grace period),
85
+
86
+ will have its orders entered automatically. During movement phases, all
87
+ units will HOLD, during retreat phases, all dislodged units will DISBAND,
88
+ and during adjustment phases, all builds will be WAIVED, and all removals
89
+ will be entered using random choice from among the power's on-board units,
90
+ with preference given to retaining units that are situated on supply centers.
91
+
92
+ Note also that unless the LATE_CHANGES rule is specified, the CIVIL_DISORDER
93
+ rule also enforces the NO_LATE_CHANGES rule (described below). This is to
94
+ prevent players from changing their orders after the deadline to take advantage
95
+ of powers that seem likely to go into civil disorder when a grace period expires.
96
+
97
+ Individual powers may also be put into perpetual automatic, don't-even-wait-for-the-deadline,
98
+ civil disorder (assuming no one like the Master enters orders for them)
99
+ by setting the PLAYER information to DUMMY, and using the
100
+ CD_DUMMIES rule, described below.
101
+
102
+ ==================================================================
103
+ ** CD_DUMMIES ** ()
104
+ Assuming no powers have set their WAIT flag, orders will be
105
+ processed as <i><u>soon</u></i> as all NON-DUMMY
106
+ players have submitted orders. Any powers having a PLAYER marked
107
+ as a DUMMY will be considered in civil disorder (as described
108
+ above) at that time. Note the distinction -- CIVIL_DISORDER
109
+ will default the orders of all powers (whether dummy or not), while
110
+ CD_DUMMIES will default the orders only of the dummy powers.
111
+
112
+ ==================================================================
113
+ ** NO_DEADLINE ** ()
114
+ In certain cases, e.g. for testing and solving Diplomacy puzzles (solitaire games),
115
+ there's no need for a deadline, and thus also not for a Timing line. It's up to the
116
+ GM to process each turn after all (relevant) orders are submitted, or for all players
117
+ to submit their orders without setting their WAIT flag. This behavior can be
118
+ influenced with the NO_WAIT and ALWAYS_WAIT options.
119
+
120
+ ==================================================================
121
+ ** REAL_TIME ** (!ALWAYS_WAIT)
122
+ If this rule is used, the game will be processed AS SOON AS
123
+ the last player submits orders (this player will have no opportunity
124
+ to modify them). Additionally, players will not be allowed to direct
125
+ that the game wait for any deadline before processing. This rule is
126
+ used especially for games with very short deadlines (for example,
127
+ 10 minutes).
128
+
129
+ ==================================================================
130
+ ** ALWAYS_WAIT ** (!REAL_TIME)
131
+ If this rule is used, orders will never process until the deadline
132
+ has arrived (unless requested by the Master using a PROCESS
133
+ command sent via e-mail). This rule is incompatible with
134
+ REAL_TIME and restricted to movement phases if NO_MINOR_WAIT is selected.
135
+
136
+ ==================================================================
137
+ ** PROPOSE_DIAS ** (!NO_DIAS)
138
+ In games that use this rule, a player makes a proposal to conclude the
139
+ game with a certain result, and all other players vote on it.
140
+ The proposal may be a concession to a specific power or a draw including
141
+ all survivors. Any negative vote on the proposal will cause it to fail.
142
+
143
+ In games NOT using this rule, draw and concession votes are never
144
+ called for. Instead, each player can select a single game ending
145
+ (concession to his own power or to any other single power, or agreement to a
146
+ draw that includes all surviving powers), and if ever all votes allow,
147
+ the game will end. No player's vote is revealed to any other player. Note
148
+ that if all players are ever found to be simultaneously voting for any
149
+ result that is NOT a concession to their own power, the game will
150
+ end in a draw shared among all surviving powers.
151
+
152
+ ==================================================================
153
+ ** NO_DIAS ** (!PROPOSE_DIAS)
154
+ Games with this rule operate in their voting as do normal
155
+ (non-PROPOSE_DIAS) games; that is, no proposal is ever made or
156
+ vetoed. However, games using the NO_DIAS rule may end in a
157
+ result other than concession to a single player or agreement to a draw
158
+ that includes all survivors. If this rule is used, each player may vote
159
+ either for the maximum size of a draw that he will accept which must
160
+ include his power, or for a solo victory by his power, or for
161
+ ANY result that does NOT include his power. Note that if all
162
+ players are ever found to be voting for a result that does
163
+ NOT include their own power, a draw shared among all surviving
164
+ powers will be declared.
165
+
166
+ ==================================================================
167
+ ** HOLD_WIN ** ()
168
+ To win a game using this rule, a player must achieve the winning condition
169
+ two game-years in a row.
170
+
171
+ ==================================================================
172
+ ** SHARED_VICTORY ** ()
173
+ When this rule is in effect, the game ends immediately after the first
174
+ player reaches the victory condition. If any other player fulfills this
175
+ condition at the same time (in games where this number is lower than
176
+ the default of half of the number of SCs plus one), they are jointly
177
+ declared winners (or participants in a draw, depending on definitions),
178
+ irrespective of the fact that one may have a higher total than the
179
+ other. This replaces the normal victory criterion where only a
180
+ single player can be victorious and ties result in the continuation
181
+ of the game.
182
+
183
+ ==================================================================
184
+ *******************************************************
185
+ ** VARIANT standard **
186
+ *******************************************************
187
+
188
+ ** NO_CHECK ** ()
189
+ This rule emulates face-to-face play, in which players could (by
190
+ accident or design) issue invalid orders to their units. This rule
191
+ is also useful in NO_PRESS games to allow for limited player
192
+ communication (see SIGNAL_SUPPORT for a more controlled alternative).
193
+
194
+ When they are entered, movement phase orders are only very minimally
195
+ checked for validity. The ONLY checks that are made at the time an
196
+ order is entered are:
197
+
198
+ - Every component of the order must be understood. That is, the
199
+ order must appear to be a Diplomacy move, convoy, support or
200
+ hold order, and all placenames must be identifiable on the map
201
+ in use. This check catches inadvertant misspellings, such as "URK" for "UKR".
202
+ In fact, this is known as the "Urk check."
203
+
204
+ - Any placename abbreviation that is potentially ambiguous is declared
205
+ erroneous and must be changed. For example, the order "TYR H" is rejected
206
+ because it may be an order for an army in Tyrolia to hold, or for a
207
+ fleet in the Tyrrhenian Sea to hold.
208
+
209
+ - A support for a fleet move may not specify the destination coast of
210
+ the fleet. This error must also be corrected.
211
+
212
+ Therefore, most errors (including the omission of the fleet-path of
213
+ a convoying army from its order!) are not detected until the phase
214
+ is ready to process, at which time the erroneous orders will be ignored.
215
+ All units that had been given erroneous or multiple orders will
216
+ HOLD (and may receive support), and all erroneous orders will
217
+ be reported in the results, flagged as (*invalid*).
218
+
219
+ ==================================================================
220
+
221
+ <!-- RULE GROUP 0 Game Start -->
222
+ <!-- RULE POWER_CHOICE -->
223
+ <!-- RULE MULTIPLE_POWERS_PER_PLAYER -->
224
+ <!-- RULE NO_OBSERVATIONS -->
225
+ <!-- RULE SOLITAIRE +NO_DEADLINE +CD_DUMMIES +ALWAYS_WAIT -->
226
+ <!-- RULE START_MASTER -->
227
+ <!-- RULE GROUP 2 Player Press -->
228
+ <!-- RULE NO_PRESS -PUBLIC_PRESS -->
229
+ <!-- RULE PUBLIC_PRESS -NO_PRESS -->
230
+ <!-- RULE GROUP 3 Movement Order -->
231
+ <!-- RULE DONT_SKIP_PHASES -->
232
+ <!-- RULE IGNORE_ERRORS -->
233
+ <!-- RULE GROUP 5 Retreat and Adjustment Order -->
234
+ <!-- RULE BUILD_ANY -->
235
+ <!-- RULE GROUP 7 Late and Vacant Power Handling -->
236
+ <!-- RULE CIVIL_DISORDER +CD_DUMMIES -->
237
+ <!-- RULE CD_DUMMIES -->
238
+ <!-- RULE GROUP 9 Deadline Handling and Phase Processing -->
239
+ <!-- RULE NO_DEADLINE -->
240
+ <!-- RULE REAL_TIME !ALWAYS_WAIT -->
241
+ <!-- RULE ALWAYS_WAIT !REAL_TIME -->
242
+ <!-- RULE GROUP 10 Game Conclusion -->
243
+ <!-- RULE PROPOSE_DIAS !NO_DIAS -->
244
+ <!-- RULE NO_DIAS !PROPOSE_DIAS -->
245
+ <!-- RULE HOLD_WIN -->
246
+ <!-- RULE SHARED_VICTORY -->
247
+ <!-- RULE VARIANT standard -->
248
+ <!-- RULE GROUP 3 Movement Order -->
249
+ <!-- RULE NO_CHECK -->
250
+ <!-- RULE DIFFERENT_ADJUDICATION -->
diplomacy/__init__.py ADDED
@@ -0,0 +1,47 @@
1
+ # ==============================================================================
2
+ # Copyright (C) 2019 - Philip Paquette
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Affero General Public License as published by the Free
6
+ # Software Foundation, either version 3 of the License, or (at your option) any
7
+ # later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
12
+ # details.
13
+ #
14
+ # You should have received a copy of the GNU Affero General Public License along
15
+ # with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ # ==============================================================================
17
+ """ Module diplomacy, represent strategy game Diplomacy. """
18
+ import logging
19
+ import os
20
+ import coloredlogs
21
+ from .engine.map import Map
22
+ from .engine.power import Power
23
+ from .engine.game import Game
24
+ from .engine.message import Message
25
+ from .client.connection import Connection, connect
26
+ from .server.server import Server
27
+ from .utils.game_phase_data import GamePhaseData
28
+
29
+ # Defining root logger
30
+ ROOT = logging.getLogger('diplomacy')
31
+ ROOT.setLevel(logging.DEBUG)
32
+ ROOT.propagate = False
33
+
34
+ STREAM_HANDLER = logging.StreamHandler()
35
+ STREAM_HANDLER.setLevel(logging.DEBUG)
36
+ COLORED_FORMATTER = coloredlogs.ColoredFormatter(fmt='%(asctime)s %(name)s[%(process)d] %(levelname)s %(message)s')
37
+ STREAM_HANDLER.setFormatter(COLORED_FORMATTER)
38
+ ROOT.addHandler(STREAM_HANDLER)
39
+
40
+ if 'DIPLOMACY_LOG_FILE' in os.environ:
41
+ LOG_FILE_NAME = os.environ['DIPLOMACY_LOG_FILE']
42
+ ROOT.info('Logging into file: %s', LOG_FILE_NAME)
43
+ FILE_HANDLER = logging.FileHandler(LOG_FILE_NAME)
44
+ FILE_HANDLER.setLevel(logging.DEBUG)
45
+ LOG_FILE_FORMATTER = logging.Formatter(fmt='%(asctime)s %(name)s[%(process)d] %(levelname)s %(message)s')
46
+ FILE_HANDLER.setFormatter(LOG_FILE_FORMATTER)
47
+ ROOT.addHandler(FILE_HANDLER)
@@ -0,0 +1,16 @@
1
+ # ==============================================================================
2
+ # Copyright (C) 2019 - Philip Paquette
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify it under
5
+ # the terms of the GNU Affero General Public License as published by the Free
6
+ # Software Foundation, either version 3 of the License, or (at your option) any
7
+ # later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
12
+ # details.
13
+ #
14
+ # You should have received a copy of the GNU Affero General Public License along
15
+ # with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ # ==============================================================================