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' ; /** Defines the SIGame Server client. */ export default interface IGameServerClient { /** Gets default computer accounts names. */ getComputerAccountsAsync ( ) : Promise < string [ ] > ; /** Gets server global info. */ getGameHostInfoAsync ( ) : Promise < HostInfo > ; /**
     * Gets partial running games list starting from the first game after the game with id  fromId .
     * To receive all games from the server, use 0 as  fromId value;
     * then use the last `gameId` in returned list as a new  fromId value.
     *  param fromId getGamesSliceAsync ( fromId ) : Promise < Slice < GameInfo > > ; /** Gets active users list in the lobby. */ getUsersAsync ( ) : Promise < string [ ] > ; /** Gets server news string. */ getNewsAsync ( ) : Promise < string | null > ; /** Sends a message to the lobby chat. */ sayInLobbyAsync ( text ) : Promise < any > ; param packageKey hasPackageAsync ( packageKey ) : Promise < boolean > ; param gameSettings param packageKey param isMale createAndJoinGameAsync ( gameSettings , packageKey , isMale ) : Promise < GameCreationResult > ; param login param isMale createAutomaticGameAsync ( login , isMale ) : Promise < GameCreationResult > ; param gameId param role param isMale param password joinGameAsync ( gameId , role , isMale , password ) : Promise < GameCreationResult > ; param message sendMessageToServerAsync ( message ) : Promise < any > ; param args msgAsync ( ... args ) : Promise < any > ; param message sayAsync ( message ) : Promise < any > ; /** Leaves running game. */ leaveGameAsync ( ) : Promise < any > ; /** Logs out from the server. */ logOutAsync ( ) : Promise < any > ; }