MatchmakingServer¶
-
class
colosseumrl.matchmaking.MatchmakingServer.
MatchMakingHandler
[source]¶ GRPC connection handler.
Clients will connect to the server and call this function to request a match.
-
class
colosseumrl.matchmaking.MatchmakingServer.
MatchmakingThread
(starting_port, hostname, max_simultaneous_games, env_class, tick_rate, realtime, observations_only, env_config_string)[source]¶ -
run
() → None[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
select_players
(requests)[source]¶ Select which players will be chosen for an upcoming game.
At some point, this should use trueskill to create matches with roughly fairly matched opponents.
- Parameters
requests (OrderedDict) – All of the players requested with their username as their key and their request and token as the values.
- Returns
A list of players that have been chosen with the appropriate data.
- Return type
List
-
-
class
colosseumrl.matchmaking.MatchmakingServer.
MatchmakingLoginThread
(connection_queue: queue.Queue, database: colosseumrl.matchmaking.RankingDatabase.RankingDatabase)[source]¶ -
run
()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
-
class
colosseumrl.matchmaking.MatchmakingServer.
MatchProcessJanitor
(match_limit: threading.Semaphore, ports_to_use_queue: queue.Queue, database: colosseumrl.matchmaking.RankingDatabase.RankingDatabase, env_class: Type[colosseumrl.BaseEnvironment.BaseEnvironment], match_server_args: Dict, player_list: List, whitelist: List = None)[source]¶ Simple thread to manage the lifetime of a game server. Will start the game server and close it when the game is finished and release any resources it was holding.
-
run
() → None[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-