matchmaking rework for multiples game modes

This commit is contained in:
LuckyLaszlo
2022-12-01 05:50:31 +01:00
parent e3fd130729
commit 6e572f2fb5
7 changed files with 67 additions and 49 deletions

View File

@@ -75,10 +75,12 @@ class ClientEvent {
class ClientAnnounce extends ClientEvent {
role: en.ClientRole;
clientId: string;
constructor(role: en.ClientRole, clientId: string = "") {
matchOptions: en.MatchOptions;
constructor(role: en.ClientRole, matchOptions: en.MatchOptions, clientId: string = "") {
super(en.EventTypes.clientAnnounce);
this.role = role;
this.clientId = clientId;
this.matchOptions = matchOptions;
}
}

View File

@@ -37,4 +37,10 @@ enum ClientRole {
spectator
}
export {EventTypes, InputEnum, PlayerSide, ClientRole}
enum MatchOptions {
// binary flags, can be mixed
noOption = 0b0,
multiBalls = 1 << 0
}
export {EventTypes, InputEnum, PlayerSide, ClientRole, MatchOptions}