Coder Social home page Coder Social logo

keeakita / drinking-game Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 50 KB

An Angular app that uses localstorage for tracking your progress in a drinking game.

Home Page: https://poop.republican

Makefile 3.54% HTML 19.71% CSS 0.26% JavaScript 59.20% Ruby 13.89% Shell 3.40%

drinking-game's People

Contributors

benlk avatar keeakita avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

benlk

drinking-game's Issues

Enable game JSON files to configure headings and section types

From #14:

We could make those lists much more dynamic than they already are, and have the JSON files specify the titles, positions, and layouts of the lists themselves. That would allow us to do the tweaking to make it feel right without introducing a special case.

The current spec looks like this:

{
    "id": "2016-10-19-presidential",
    "title": "October 19th 2016 Presidential Debate",
    "checklist": [
        "string"
    ],
    "everytime": {
        "actions": [
            "string",
        ],
        "phrases": [
            "string"
        ],
        "shots": [
            "string",
        ]
    }
}

What we could do is maybe something like this:

  • the indices on the "sections" array are the HTML ids for the section,
  • "counter" specifies which summation counter to increment.
  • "type" explains which partial to load for the forms/labels for each item, be it a checkbox or a +- box or something else entirely (yay options for expansion!)
  • "prompts" contains the actual words that display.
{
    "id": "2016-10-19-presidential",
    "title": "October 19th 2016 Presidential Debate",
    "schema": "2",
    "sections": {
        "firsts": {
            "counter": "Shots",
            "type": "checkbox",
            "heading": "Drink the first time",
            "prompts": [
                "string",
                "string",
                "string",
            ],
        },
        "actions": {
            "counter": "Drinks",
            "type": "counter",
            "heading": "Everytime a candidate:",
            "prompts": [
                "string",
                "string",
                "string",
            ],
        },
        "phrases": {
            "counter": "Drinks",
            "type": "counter",
            "heading": "Everytime a candidate says:",
            "prompts": [
                "string",
                "string",
                "string",
            ],
        },
        "shots": {
            "counter": "Shots",
            "type": "counter",
            "heading": "Take a shot if:",
            "prompts": [
                "string",
                "string",
                "string",
            ],
        }
    },
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.