Skip to content

Game kind

GameKind is a two-value enum that tells the engine whether a game can have at most one active instance across the whole server (SINGLETON) or whether multiple lobbies can coexist (MULTI_LOBBY). The classification controls which default phase flow Game.Builder picks and how the pad behaves when a player walks in while a game is already running.

  • You’re declaring a new Game and need to pick the classification.
  • You’re reading the kind to gate “can I start another lobby” logic.
  • You’re authoring an admin UI that lists games and want to colour singletons differently.
package me.zlex.conduit.game;
public enum GameKind {
SINGLETON, // at most one instance at a time across the server
MULTI_LOBBY // independent lobbies coexist
}
import me.zlex.conduit.game.Game;
import me.zlex.conduit.game.GameKind;
public final class Picker {
public static Game.Builder builderFor(String id, String displayName, GameKind kind) {
return Game.builder(id, displayName).kind(kind);
}
public static boolean canStartAnotherLobby(Game game) {
if (game.kind() == GameKind.SINGLETON) {
return !InstancesOfGame.anyActive(game.id());
}
return true;
}
}
  • MULTI_LOBBY is the default in Game.Builder — pick SINGLETON only for “the whole server is in one round” modes.
  • The kind doesn’t affect InstanceManager pool sizing — both share the same pool of 8 dimensions.
  • Block Shuffle, Fragile Pockets, and most party games are MULTI_LOBBY.