Loading game…
Theme
Grid size
Install
Two commands, then ship.
Pick the subpath that matches your stack. Full Cloudflare integration takes about ten minutes including DO + D1 migrations.
bun add @orphnet/snake-game
bunx d1-eloquent migrate
Integration
Mount the router. Bind the DO. Done.
// worker/index.ts
import { Hono } from 'hono'
import { createSnakeRouter } from '@orphnet/snake-game/hono'
import { SnakeArenaDO, D1GameRepository } from '@orphnet/snake-game/cloudflare'
const app = new Hono<{ Bindings: Env }>()
app.route('/snake', createSnakeRouter({
basePath: '/snake',
ports: (c) => ({ games: new D1GameRepository(c.env.DB) }),
}))
export { SnakeArenaDO }
export default appWhat's next
Play a round against someone right now.
Five-second matchmaking, no signup. Or grab a room code and share it with a friend.