v0.9.30: Rework ladder for team matchmaking (#426)
* Add function for yielding matches asynchronusly
* Move matching code so that MatchmakerQueue does not directly call start_game
This will make MatchmakerQueue extend easily to XvX games, and allow LadderService (or some other service) to simply create another queue for XvX and handle matches as appropriate.
* Abstracting away the MatchmakerQueue implementation
* Move search tracking into LadderService
* Remove player from _informed_players on disconnect
* Call stop search with correct args
* Use generic quality function that will work for NvM games
* Some cleanup
* Adjust search to work with any arbitrary team set up
* Set all players's states, not just the initiator
* LadderService.start_search does not need to be async
* Refactor
* Only remove players from list if they exist in the list
* Log unknown player states
* Do not set state to IDLE if player just got matched
* Remove old calls to sleep
* Rename variable and add comments to make iter_matches more clear
* Add a more reliable way of waiting for ladder1v1 hosts
* Add additional error handling if the host cancels the match setup
* Remove unused method `on_message_received`
* Add pipenv script for running tests
* Remove outdated test
* Fix deprecation warning
* Update dependencies
* Only set is_hosted value if it has not already been set
* Always send the guest a game launch command, even if the host timed out
This is necessary to make the client realize it has been removed from the ladder queue. In the future, the client should do this when it receives the command.
* Remove extra debug output
* Use search.matches_with function
* More input sanitization
* Fixed a bug where find_match would only check the first item in the queue
* Fixed a bug where searches were not properly removed on cancel
* Add match_found message when players are matched