
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@enigma-lake/tower-play-controller-sdk
Advanced tools
A React component library for building gameplay interfaces
@enigma-lake/tower-play-controller-sdk is a React SDK for Tower-style game controls.
It includes:
PlayControllerProps supports two modes:
withoutRiskAndAutoplay: truenpm install @enigma-lake/tower-play-controller-sdk
import "@enigma-lake/tower-play-controller-sdk/dist/style.css";
import { AutoManualPlayProvider, type PlayControllerProps } from "@enigma-lake/tower-play-controller-sdk";
const config: PlayControllerProps = {
currencyOptions,
panel: { bgColorHex: "#01243A", bgColorOpacity: 0.5 },
dropdown: {
bgColorHex: "#01243A",
riskColorConfig: {
LOW: "#4CAF50",
MEDIUM: "#FF9800",
HIGH: "#F44336",
},
},
leftWidgets: [],
centerWidgets: [],
rightWidgets: [],
onPlay: () => {},
onCashout: () => {},
onAutoPlay: (selection, next, stop) => {
// call next() when round succeeds, stop() to abort autoplay
next();
},
playOptions: {
isPlaying: false,
canCashout: false,
disabledCashout: false,
disabledController: false,
disabledMenu: false,
displayController: true,
disableInput: false,
risks: ["LOW", "MEDIUM", "HIGH"],
currentRisk: "LOW",
onRiskChange: () => {},
showAutoPlayToast: () => {},
totalBalance: 1000,
playHook: () => ({
playAmount: 1,
setPlayAmount: () => {},
playLimits: undefined,
}),
autoPlayDelay: 1500,
},
};
<AutoManualPlayProvider config={config}>
{() => null}
</AutoManualPlayProvider>;
canCashout and disabledCashout are independent:
canCashout: false: cashout button state is not shown.canCashout: true + disabledCashout: false: cashout is visible and clickable.canCashout: true + disabledCashout: true: cashout is visible but disabled.When disabledCashout is true, click handlers are blocked in:
Full mode (default):
onAutoPlayplayOptionsdropdown.riskColorConfig is requiredSimplified mode:
withoutRiskAndAutoplay: true;
In simplified mode:
onAutoPlay and onAutoPlayStop are not requiredplayOptionsdropdown.riskColorConfig is not requireddoubleOrNothing?: {
disabled: boolean;
display: boolean;
onDoubleOrNothingOpen: () => void;
onDoubleOrNothingClose: () => void;
};
Behavior:
display is truePlayControllerProps for strongly typed integration.playOptions values in sync with your game engine state.displayController: false hides the SDK UI entirely.FAQs
A React component library for building gameplay interfaces
We found that @enigma-lake/tower-play-controller-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.