### Hierarchy

- LobbyRunner

## Index

### Constructors

- constructor

### Properties

- banPlayer
- continueTournament
- kickPlayer
- lobby
- pubSub
- startTournament
- tournamentRunner

### Methods

- addPlayerToLobby
- ifAdmin

## Constructors

### constructor

- new LobbyRunner(admin: Player): LobbyRunner

- - Defined in src/lobby/LobbyRunner.ts:12

  #### Parameters

  - ##### admin: Player

  #### Returns LobbyRunner

## Properties

### Private banPlayer

banPlayer: (Anonymous function) = this.ifAdmin((lobbyName: string, data: any) => {const playerIndex = this.lobby.players.indexOf(data.player);this.lobby.players.splice(playerIndex, 1);if (this.lobby.bannedPlayers.indexOf(data.player) > -1) {return;}this.lobby.bannedPlayers.push(data.player);this.pubSub.publish(EVENTS.BROADCAST_NAMESPACED, {namespace: lobbyName,event: 'lobby player banned',payload: this.lobby,});// Send confirmation to playerthis.pubSub.publish(EVENTS.SERVER_TO_PLAYER, {player: data.player,event: 'banned',payload: null,});})

- Defined in src/lobby/LobbyRunner.ts:148

### Private continueTournament

continueTournament: (Anonymous function) = this.ifAdmin((lobbyName: string) => {this.tournamentRunner.continue();// Notifythis.pubSub.publish(EVENTS.BROADCAST_NAMESPACED, {namespace: lobbyName,event: 'lobby tournament continued',payload: this.lobby,});})

- Defined in src/lobby/LobbyRunner.ts:119

### Private kickPlayer

kickPlayer: (Anonymous function) = this.ifAdmin((lobbyName: string, data: any) => {const playerIndex = this.lobby.players.indexOf(data.player);this.lobby.players.splice(playerIndex, 1);this.pubSub.publish(EVENTS.BROADCAST_NAMESPACED, {namespace: lobbyName,event: 'lobby player kicked',payload: this.lobby,});// Send confirmation to playerthis.pubSub.publish(EVENTS.SERVER_TO_PLAYER, {player: data.player,event: 'kicked',payload: null,});})

- Defined in src/lobby/LobbyRunner.ts:130

### lobby

lobby: Lobby

- Defined in src/lobby/LobbyRunner.ts:10

### Private pubSub

pubSub: PubSub

- Defined in src/lobby/LobbyRunner.ts:12

### Private startTournament

startTournament: (Anonymous function) = this.ifAdmin((lobbyName: string) => {this.tournamentRunner.start();// Notifythis.pubSub.publish(EVENTS.BROADCAST_NAMESPACED, {namespace: lobbyName,event: 'lobby tournament started',payload: this.lobby,});})

- Defined in src/lobby/LobbyRunner.ts:108

### tournamentRunner

tournamentRunner: TournamentRunner

- Defined in src/lobby/LobbyRunner.ts:11

## Methods

### Private addPlayerToLobby

- addPlayerToLobby(data: any): void

- - Defined in src/lobby/LobbyRunner.ts:39

  #### Parameters

  - ##### data: any

  #### Returns void

### Private ifAdmin

- ifAdmin(next: any): (Anonymous function)

- - Defined in src/lobby/LobbyRunner.ts:100

  Wrap any method in a check for the admin user

  #### Parameters

  - ##### next: any

  #### Returns (Anonymous function)

Generated using TypeDoc