using System.Collections.Generic; using System.Net; using System.Threading.Tasks; using Impostor.Api.Innersloth; using Impostor.Api.Net; using Impostor.Api.Net.Inner; using Impostor.Api.Net.Inner.Objects; using Impostor.Api.Net.Messages; namespace Impostor.Api.Games { public interface IGame { GameOptionsData Options { get; } GameCode Code { get; } GameStates GameState { get; } IGameNet GameNet { get; } IEnumerable Players { get; } IPEndPoint PublicIp { get; } int PlayerCount { get; } IClientPlayer Host { get; } bool IsPublic { get; } IDictionary Items { get; } int HostId { get; } IClientPlayer GetClientPlayer(int clientId); /// /// Adds an to the ban list of this game. /// Prevents all future joins from this . /// /// This does not kick the player with that from the lobby. /// /// /// The to ban. /// void BanIp(IPAddress ipAddress); /// /// Syncs the internal to all players. /// Necessary to do if you modified it, otherwise it won't be used. /// /// A representing the asynchronous operation. ValueTask SyncSettingsAsync(); /// /// Sets the specified list as Impostor on all connected players. /// /// List of players to be Impostor. /// A representing the asynchronous operation. ValueTask SetInfectedAsync(IEnumerable players); /// /// Send the message to all players. /// /// Message to send. /// Required limbo state of the player. /// A representing the asynchronous operation. ValueTask SendToAllAsync(IMessageWriter writer, LimboStates states = LimboStates.NotLimbo); /// /// Send the message to all players except one. /// /// Message to send. /// The player to exclude from sending the message. /// Required limbo state of the player. /// A representing the asynchronous operation. ValueTask SendToAllExceptAsync(IMessageWriter writer, int senderId, LimboStates states = LimboStates.NotLimbo); /// /// Send a message to a specific player. /// /// Message to send. /// ID of the client. /// A representing the asynchronous operation. ValueTask SendToAsync(IMessageWriter writer, int id); } }