52 lines
1.5 KiB
Python
52 lines
1.5 KiB
Python
# This file should only contain constants that we use throughout the program,
|
|
# i.e. stuff that might be changed at some point, but not changed on user-level
|
|
# It's not meant to include all string constants or anything, just the ones that are important for functioning.
|
|
|
|
APP_NAME = 'hanabi-league'
|
|
DB_CONFIG_FILE_NAME = 'db_config.yaml'
|
|
CONFIG_FILE_NAME = 'config.yaml'
|
|
|
|
DEFAULT_DB_NAME = 'hanabi-league'
|
|
DEFAULT_DB_USER = 'hanabi-league'
|
|
DEFAULT_DB_PASS = 'hanabi-league'
|
|
|
|
DB_TABLE_NAMES = [
|
|
"users"
|
|
, "user_accounts"
|
|
, "downloads"
|
|
, "variants"
|
|
, "games"
|
|
, "game_participants"
|
|
, "game_actions"
|
|
, "seeds"
|
|
, "variant_base_ratings"
|
|
, "variant_ratings"
|
|
, "user_base_ratings"
|
|
, "user_ratings"
|
|
, "statistics"
|
|
]
|
|
|
|
DATABASE_SCHEMA_PATH = 'install/database_schema.sql'
|
|
DEFAULT_DB_CONFIG_PATH = 'install/default_db_config.yaml'
|
|
DEFAULT_CONFIG_PATH = 'install/default_config.yaml'
|
|
|
|
VARIANTS_JSON_URL = 'https://raw.githubusercontent.com/Hanabi-Live/hanabi-live/main/packages/data/src/json/variants.json'
|
|
|
|
FORBIDDEN_GAME_OPTIONS = [
|
|
"deckPlays"
|
|
, "emptyClues"
|
|
, "oneExtraCard"
|
|
, "oneLessCard"
|
|
, "allOrNothing"
|
|
, "detrimentalCharacters"
|
|
]
|
|
|
|
# Cache time (in seconds) for history requests of players
|
|
# In case of frequent reruns (especially during development), we do not want to stress the server too much.
|
|
USER_HISTORY_CACHE_TIME = 5 * 60
|
|
|
|
# Fraction of seeds which is assumed to be unwinnable
|
|
UNWINNABLE_SEED_FRACTION = 0.02
|
|
|
|
|
|
WEBSITE_OUTPUT_DIRECTORY = 'build'
|