Skip to content

grackleclub/rulette

Repository files navigation

rulette

Test suggest a new rule report a bug

rule stacking game based on dropout.tv's Rulette (S7E7) (and S8E2).


gameplay

Players spin that wheel (wheel) to acquire and trade behavioral rules to increasingly silly ends. A host (game creator) moderates the madness.

development

requirements

development

update and test

Updates sqlc definitions and runs all tests (with optional 'verbose' output):

bin/test -v

run

Start the backend (with 'debug' level logging):

bin/dev

debug

Fetch the json from the terminal:

bin/state

Or just visit https://localhost:7777/{game_id}/data/state.

mock

Sets up a game, then opens Firefox as specified player. Exemplified: join as player 1:

bin/mock -j 1

database

Setup the data access layer:

bin/sqlc
  • SQL schema hand-written db/schema
  • SQL queries hand-written in db/queries
  • sqlc reads db/sqlc.yml to autogenerate type-safe code in db/sqlc
  • callable from Go:
    data, err := queries.DataAccessLayerQueryHere(ctx, args)```

htmx

htmx is a JavaScript library for lightweight frontends using HTML as the engine of application state1.

bin/htmx

Vendors the most recent htmx release in static/htmx and updates the version in go.mod.

Footnotes

  1. https://en.wikipedia.org/wiki/HATEOAS