aboutsummaryrefslogtreecommitdiff
path: root/src/match_up/__init__.py
blob: 2b1e42b892e0fb2a72f86d8b75ff398c78b56449 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from pathlib import PurePath
from match_up.model import PlaySession
from match_up.tests import (
    TEST_DATABASE_LOCATION,
    generate_test_database,
    activate_random_players,
)

DATABASE_LOCATION = "storage.json"


class Application:
    def __init__(self, debug=False):
        if debug:
            database_location = TEST_DATABASE_LOCATION
        else:
            database_location = DATABASE_LOCATION
        self.session = PlaySession(PurePath(database_location))


def main():
    generate_test_database()
    activate_random_players()
    a = Application(debug=True)
    print(a.session)