Compare commits
1 Commits
af3721009a
...
3d3a3f0716
| Author | SHA1 | Date |
|---|---|---|
|
|
3d3a3f0716 |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
19
library.py
19
library.py
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
from typing import TYPE_CHECKING
|
||||
import json
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
|
@ -13,23 +12,13 @@ if TYPE_CHECKING:
|
|||
class Library:
|
||||
|
||||
__verses: dict
|
||||
__games: list[Game]
|
||||
__games: Game
|
||||
|
||||
def __init__(self):
|
||||
with open("data/scripture-frequencies.json", encoding='utf-8') as file:
|
||||
self.__verses = json.load(file)
|
||||
self.__games = []
|
||||
pass
|
||||
|
||||
def join_game(self, name: str, game_num: int = -1):
|
||||
if game_num == -1:
|
||||
for i, game in enumerate(self.__games):
|
||||
if not game.active:
|
||||
game_num = i
|
||||
break
|
||||
else:
|
||||
self.__games.append(Game())
|
||||
game_num = len(self.__games) - 1
|
||||
self.__games[game_num].add_player(name)
|
||||
def join_game(self, name: str):
|
||||
pass
|
||||
|
||||
def get_verse(self, difficulty: int):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in New Issue