Skip to content

Persist games into a DB #1

@thetanav

Description

@thetanav

Let's create a simple postgres table + Prisma for ORM which stores all the game information

  1. Whenever a new game is started, create an entry in the game table
  2. As the users make moves, store it in a moves table which has a foreign key to the game table
  3. Add ids to every created game and add a new event that let's users re-join a game with a given id if their wifi went down/ws conn reset
  4. If a user wants to join a game and there is no in memory Game object for it, recover the game from the DB and put it back in memory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions