import Role from '../model/enums/Role' ; import GameCreationResult from '../model/server/GameCreationResult' ; import GameInfo from '../model/server/GameInfo' ; import GameSettings from '../model/server/GameSettings' ; import HostInfo from '../model/server/HostInfo' ; import PackageKey from '../model/server/PackageKey' ; import Slice from '../model/server/Slice' ; import IGameServerClient from './IGameServerClient' ; /** Defines a disconnected version of IGameServerClient. */ export default class DummyGameServerClient implements IGameServerClient { async getComputerAccountsAsync ( ) { return [ ] ; } async getGameHostInfoAsync ( ) { this . throwNotConnectedError ( ) ; } async getGamesSliceAsync ( fromId ) { this . throwNotConnectedError ( ) ; } async getUsersAsync ( ) { return [ ] ; } async getNewsAsync ( ) { return null ; } async sayInLobbyAsync ( text ) { } async hasPackageAsync ( packageKey ) { return false ; } async createAndJoinGameAsync ( gameSettings , packageKey , isMale ) { this . throwNotConnectedError ( ) ; } async createAutomaticGameAsync ( login , isMale ) { this . throwNotConnectedError ( ) ; } async joinGameAsync ( gameId , role , isMale , password ) { this . throwNotConnectedError ( ) ; } async sendMessageToServerAsync ( message ) { } async msgAsync ( ... args ) { } async sayAsync ( ... args ) { } async leaveGameAsync ( ) { } async logOutAsync ( ) { } private throwNotConnectedError ( ) { throw new Error ( 'Connection is closed!' ) ; } }