Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/rail-drop/.claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "rail-drop",
"runtimeExecutable": "npx",
"runtimeArgs": ["vite", "dev", "--host", "--port", "3002"],
"port": 3002
}
]
}
3 changes: 3 additions & 0 deletions apps/rail-drop/lingui.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from 'config-lingui';

export default config;
48 changes: 48 additions & 0 deletions apps/rail-drop/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "rail-drop",
"version": "0.0.0",
"private": true,
"license": "MIT",
"scripts": {
"format": "prettier --write --ignore-path=../../.prettierignore .",
"lint": "eslint \"src\"",
"dev": "vite dev --host --port 3002",
"build": "vite build",
"preview": "vite preview"
},
"type": "module",
"devDependencies": {
"eslint": "9.21.0",
"eslint-config-custom": "workspace:*",
"config-ts": "workspace:*",
"config-vite": "workspace:*",
"config-svelte": "workspace:*",
"config-lingui": "workspace:*",
"@sveltejs/vite-plugin-svelte": "5.0.3"
},
"dependencies": {
"lodash": "4.17.16",
"@types/lodash": "4.17.16",
"svelte": "5.20.5",
"vite": "6.2.0",
"@sveltejs/kit": "2.17.3",
"@lingui/core": "5.2.0",
"envs": "workspace:*",
"rgs-requests": "workspace:*",
"pixi-svelte": "workspace:*",
"state-shared": "workspace:*",
"constants-shared": "workspace:*",
"components-shared": "workspace:*",
"components-layout": "workspace:*",
"components-ui-html": "workspace:*",
"components-pixi": "workspace:*",
"components-ui-pixi": "workspace:*",
"utils-event-emitter": "workspace:*",
"utils-shared": "workspace:*",
"utils-xstate": "workspace:*",
"utils-book": "workspace:*",
"utils-bet": "workspace:*",
"utils-layout": "workspace:*",
"utils-sound": "workspace:*"
}
}
2 changes: 2 additions & 0 deletions apps/rail-drop/src/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; background: #0a0a14; }
12 changes: 12 additions & 0 deletions apps/rail-drop/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body style="margin: 0; padding: 0; overflow: hidden; background-color: black">
<div>%sveltekit.body%</div>
</body>
</html>
26 changes: 26 additions & 0 deletions apps/rail-drop/src/components/EnableGameActor.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script lang="ts">
import { onMount } from 'svelte';
import { gameActor } from '../game/actor';
import { getContext } from '../game/context';

const context = getContext();

onMount(() => {
const { unsubscribe } = gameActor.subscribe((snapshot) => {
context.stateXstate.value = snapshot.value;
});
gameActor.start();
gameActor.send({ type: 'RENDERED' });

return () => {
unsubscribe();
gameActor.stop();
};
});

context.eventEmitter.subscribeOnMount({
bet: () => gameActor.send({ type: 'BET' }),
autoBet: () => gameActor.send({ type: 'AUTO_BET' }),
resumeBet: () => gameActor.send({ type: 'RESUME_BET' }),
});
</script>
Loading