aboutsummaryrefslogtreecommitdiff
path: root/diplomacy
AgeCommit message (Collapse)Author
2019-09-14Renamed argument in channel methods from 'game_object' to 'game'Philip Paquette
2019-09-14.render() method - Added arg 'output_path' to be able to save img on diskPhilip Paquette
2019-09-14Added ReadtheDocs documentation for the public APIPhilip Paquette
- Reformatted the docstring to be compatible - Added tests to make sure the documentation compiles properly - Added sphinx as a pip requirement Co-authored-by: Philip Paquette <pcpaquette@gmail.com> Co-authored-by: notoraptor <stevenbocco@gmail.com>
2019-09-10Added ability to specify a custom SVG path in the rendererPhilip Paquette
- This could be used for instance to change the colours on the map.
2019-09-10Added ability to load a custom map by specifying the path to a '.map' filePhilip Paquette
2019-09-06[API] Catching TypeError and ValueError on json.loadsPhilip Paquette
2019-08-28Fixed the 'Unknown request' race conditionPhilip Paquette
- This happened when a response was received before being marked as 'waiting_responses'
2019-08-28Make sure to clear all orders before setting a new game state.notoraptor
2019-08-28Client sends a 'UnknownToken' request when it receives a notification for an ↵notoraptor
unknown token.
2019-08-28Use calls to Game parent methods in function to_saved_game_format().notoraptor
This will help using the function even with derived classes.
2019-08-28Set default server game rules without rule SOLITAIRE.notoraptor
2019-08-26[API] Catching basic HTTP errors (i.e. unable to connect)Philip Paquette
2019-08-23[API] Logging error if no response.body is returnedPhilip Paquette
2019-08-21[API] Converting '-' to 'R' during retreats phasePhilip Paquette
2019-08-21[API] Disband order during 'A' phase strips the coastPhilip Paquette
2019-08-14[Web] Integrated new maps on the web interfacenotoraptor
- Fixed bug with incorrect dislodged unit on pure map - [python] Make sure dummy powers are registered only for standard maps. - Hardcoded supply centers into SVG files. - Removed supply centers CSS classes. - Update positions for units and dislodged units on all maps. - Converted SVGs to React. - Removed "sym" classes and hardcode related styles into symbol definitions. - Reordered map list (standard at top, then other ones in alphabetical order) - Displayed + button for all maps and disable it for maps without variants. - Minified generated code when converting SVG files to React. - [web] Added ability to hide/display map abbreviations.
2019-08-14Added svg for 'modern'Philip Paquette
2019-08-14Added svg for 'ancmed'Philip Paquette
2019-08-10[API] Fixed issue with multiple convoy orders and support of unit moving via ↵Philip Paquette
convoy - The "convoyPath" for 'Move via' is simply a plausible path for start to dest - For a support move of a convoyed unit, the path must not include the unit issuing the support - For a convoy order, the path must include the unit issuing the convoy order
2019-08-09[API] Implemented an abstract BaseAPI classPhilip Paquette
2019-08-09[API] Fixed issue when disbanding a fleet from a coastPhilip Paquette
2019-08-08DAIDE - Assign bot to a specific power if 'POW:' in NME requestPhilip Paquette
2019-08-06Fixed issue with 1v1 maps on Webdip API (map_name not set)Philip Paquette
2019-08-05{web] Just reload interface when notification "power orders flag" is received.notoraptor
This should prevent warnings "unknown power XXX" and then fix #57 .
2019-08-01Refactored SVG map into a React componentnotoraptor
- Create link to diplomacy map folder into web/src/diplomacy/maps - Remove old web/src/gui/map folder. - [web] Handle click only on current map. - [web/game] Remove useless `wait` state. - Remove unused nodejs modules. - [web] Use queue to handle game notifications in sequential order. - Make all calls to setState() asynchronous in Page and ContentGame components. - Make sure notifications are handled in the order in which they come.
2019-08-01Removed sending powers controlled notifications before processing phasenotoraptor
2019-08-01ChoosePower - Powers are sorted by alphabetical ordernotoraptor
2019-08-01Renamed CSS class 'invisible' to 'invisibleContent' to avoid name collision ↵notoraptor
with bootstrap
2019-08-01Added overflow-y: scroll to CSS to prevent vertical scroll bar from appearingnotoraptor
2019-07-25Add select via shortcut (#61)notoraptor
- [web][select via dialog] Add shortcuts M and V. - [web][select via dialog] Asynchronously handle "select via" method, so that shortcut callback can continue to run (and then set its state) without waiting for callback return. This should help to prevent React from updating an unmounted shortcut component.
2019-07-25[Web] Added game creation interfacenotoraptor
- Replaced fancybox with react-confirm-alert + dialog box - Removed unused code - Default map can be selected with 1-click - Added ability to select map variants
2019-07-23[Web] - Set withOrders to 'N/A' when the power has no orderable locsnotoraptor
Should fix #58 .
2019-07-21Fixed game advances even if no orders are received for dummiesPhilip Paquette
2019-07-21Fixed synchronization issuesnotoraptor
- Added __enter__, __exit__, and .current_state() to game object - set_orders throws an exception is the server phase is not the same as the client phase - Returning only waiting dummy powers to bot
2019-07-21Logging DiplomacyException for _on_socket_message with additional detailsPhilip Paquette
2019-07-19[python] Add a new method to retrieve powers available for bots.notoraptor
2019-07-19[web] Update state correctly when a power is kicked. (#54)notoraptor
2019-07-18Reset local orders for a power if we receive a power orders update.notoraptor
- Does not allow to join a power which is eliminated. - When clicking on "reset", reset local orders only for current selected power.
2019-07-18Open DAIDE port on game loading and display on webnotoraptor
- Open DAIDE port on game loading too, and [web] Display DAIDE port on game title. - [server] Also delete backup game file when deleting game. - [python] Add optional parameter `server` to ServerGame constructor to init server game with a server as soon as it is possible. Add field `daide_port` to Game for client games. When creating game, register it on server before generating client games, so that DAIDE ports are known on client game generation. Move DAIDE port opening into Server.add_new_game() and Server.get_game(), so that port is opened as soon as a new game is added or a game is loaded. Move DAIDE port closing for specific game into Server.delete_game(). Add DAIDE port to client game field daide_port if known. [web] Display DAIDE port if available in game title on game page. - [python] Display game ID in log when opening DAIDE port. - [server] Close DAIDE port as soon as game is done. - Update dependencies.
2019-07-17[web] Make button "Delete all" remove only orders from current se… (#49)notoraptor
- Make button "Delete all" remove only orders from current selected power. - Reorganize code - [web] Remove bugged and useless function gameReloaded() from game page. - This function caused error `engine.getPhaseType is not a function` for games with deadlines. - Move function saveGameToDisk into its own file. - [web] Add documentation to methods involved in orders management to help understand what happens. - Move methods getServerOrders() from game GUI component to game engine object. - Rename method onSetNoOrders to onSetEmptyOrdersSet. - Rename property in PowerActionsForm: onNoOrders => onPass. - [web] Update sending orders to send request clearOrders when local orders list is null. - Renamed local file: - components/power_order => power_orders - forms/power_actions_form => power_order_creation_form - Move power orders buttons bar to a separate file: - components/power_orders_actions_bar - [web] Improve messages about local/server defined orders.
2019-07-17[web] Set table info to "N/A" for eliminated powers.notoraptor
Should fix #36 .
2019-07-16Web - User should auto-pass when no orders are possible. (#43)notoraptor
- Set default empty orders set for unorderable powers after a processing. - Set wait to False for unorderable powers. - Notify powers wait flags when sending game processed notifications. - Do not send empty orders set for unorderable powers in network test.
2019-07-16Go back to connection page from any other page if re-connection failed after ↵notoraptor
all attempts. This should fix #16 .
2019-07-16[web] Add a button to delete game. (#39)notoraptor
- [server] Also delete game from RAM.
2019-07-07Updated the web interface to have 3 tabs - Results / Messages / CurrentPhilip Paquette
- Updated dependencies in package-lock.json - Set default homepage to "." so that built pages are relative to "index.html". - Add module "helmet" to handle page title. - Simplified page loading (replace static function builder with direct call to a method with component as argument). - Move function loadGameFromDisk in a separate file. - Use React context to access page object. - Add a new React component "Navigation" and simplify page rendering. - Add ability to choose power for any kind of loaded game. In phase history: - Show messages from all past and currently displayed phase. - Display messages from past phase with gray background. - Show messages per protagonist in tabs. - Show message phase in message header - Display message wide (header left, body right). - Display short names for powers in message tabs header. - Add warn function to page component. - Messages from previous phase are displayed with gray color text. - Game registration password input is displayed only if required - On games page: - sorted by descending timestamp created. - In table, game ID is displayed with human readable created date. - Prevent messages from displaying twice. - Re-add checkbox "show orders" to display arrow orders on past maps. - Handle HTML break-lines <br/> and remove all other HTML tags when displaying messages. - Use latest phase as current game phase when loading a game from disk.
2019-06-30Not displaying 'Notification received' for every notificationPhilip Paquette
2019-06-14Gracefully handling UnpicklingError with convoys cachePhilip Paquette
2019-06-14DAIDE - Added various tests to replay full games using the DAIDE interfaceSatya Ortiz-Gagne
2019-06-14Using OrderResults to indicate the correct order results during adjudicationPhilip Paquette
- Modified DATC tests for consistency
2019-06-14DAIDE - Added connection_handler and serverSatya Ortiz-Gagne
- Ability to open and close port when DAIDE games are started and stopped - Can get the DAIDE port using a request