/rpsls-elixir

A Game of Rock Paper Scissors Lizard Spock

Primary LanguageElixir

Rock Paper Scissors Lizard Spock Game

Pierre_ciseaux_feuille_lézard_spock_aligned.svg (image by DMacks)

RPSLS(Rock Paper Scissors Lizard Spock) is an extension to the original game of rock-paper-scissors. The additional characters were added by Sam Kass and Karen Bryla before being adopted, reordered, and overpopularised by The Big Bang Theory.

Database Tables diagram

erDiagram
    users {
        integer id PK
        string name
        string email
        enum[] scopes "admin"
    }
    moves {
        integer id PK
        integer user_id FK
        integer play_id FK
        enum[] feature "rock,paper,scissors,lizard,spock"
    }
    plays {
        integer id PK
        integer lobby_id FK
    }
    lobbies {
        integer id PK
        string slug
    }
    users ||--o{ moves : place
    plays ||--o{ moves : perform
    lobbies ||--o{ plays : contain

Run locally and experiment

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Attribution