import json
from collections import Counter
from pathlib import Path

DATA_PATH = Path(__file__).parent.parent.joinpath("data.json").resolve()

if __name__ == "__main__":
    with open(DATA_PATH, 'r') as infile:
        data = json.load(infile)
    c = Counter()
    for game in data:
        c.update(game['mechanics'])

    print(c)

