diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-04-04 17:06:26 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-04-04 17:06:26 +0200 |
| commit | 5c919160e3c6c3476f7ffc760a16c279b93891bd (patch) | |
| tree | 28a2e504844eac857380f0dfafc65ba36f2cab28 /src/match_up/__init__.py | |
| parent | 93107be91806cc7bf35b33d090d185c988fafda7 (diff) | |
First useful code
Diffstat (limited to 'src/match_up/__init__.py')
| -rw-r--r-- | src/match_up/__init__.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/match_up/__init__.py b/src/match_up/__init__.py index 3e74a3d..7b30c1b 100644 --- a/src/match_up/__init__.py +++ b/src/match_up/__init__.py @@ -1,2 +1,19 @@ +from pathlib import PurePath +from time import sleep +from match_up.model import PlayerDatabase +from match_up.tests import generate_test_database, remove_test_database + + +class PlaySession: + def __init__(self, database_location: PurePath): + self.data = PlayerDatabase(database_location) + + def main(): - print("Hello!") + generate_test_database() + s = PlaySession(PurePath("test_storage.json")) + for player in s.data.get_players(): + print(player) + sleep(2) + s.data._database.close() + remove_test_database() |
