foul-magics/Mage.Server/src/main/java/mage/server/managers/GameManager.java
Oleg Agafonov 53add71826 Improved network stability and other related fixes:
* server: fixed that a critical errors ignored in user commands threads (now it will be added to the logs);
* network: fixed frozen user responses in some use cases;
* network: fixed accidental and incorrect user responses (only latest response will be used now);
* network: improved freeze logs, added problem method name and code's line number;
* cheats: removed outdated deck and card load logic (only init.txt commands supports now);
* cheats: fixed wrong priority after add card dialog (closes #11437);
* cheats: improved stability and random errors on cheat executes (related to #11437);
* docs: added details on network and thread logic, human feedback life cycle, etc (see HumanPlayer, ThreadExecutorImpl);
2023-11-24 21:22:16 +04:00

52 lines
1.5 KiB
Java

package mage.server.managers;
import mage.cards.decks.DeckCardLists;
import mage.constants.ManaType;
import mage.constants.PlayerAction;
import mage.game.Game;
import mage.game.GameOptions;
import mage.server.game.GameController;
import mage.view.GameView;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
public interface GameManager {
UUID createGameSession(Game game, ConcurrentHashMap<UUID, UUID> userPlayerMap, UUID tableId, UUID choosingPlayerId, GameOptions gameOptions);
void joinGame(UUID gameId, UUID userId);
Optional<UUID> getChatId(UUID gameId);
void sendPlayerUUID(UUID gameId, UUID userId, UUID data);
void sendPlayerString(UUID gameId, UUID userId, String data);
void sendPlayerManaType(UUID gameId, UUID playerId, UUID userId, ManaType data);
void sendPlayerBoolean(UUID gameId, UUID userId, Boolean data);
void sendPlayerInteger(UUID gameId, UUID userId, Integer data);
void quitMatch(UUID gameId, UUID userId);
void sendPlayerAction(PlayerAction playerAction, UUID gameId, UUID userId, Object data);
boolean watchGame(UUID gameId, UUID userId);
void stopWatching(UUID gameId, UUID userId);
void cheatShow(UUID gameId, UUID userId, UUID playerId);
void removeGame(UUID gameId);
boolean saveGame(UUID gameId);
GameView getGameView(UUID gameId, UUID playerId);
int getNumberActiveGames();
Map<UUID, GameController> getGameController();
}