2023-11-22 15:34:24 +01:00
|
|
|
# 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
|
2023-11-22 16:21:30 +01:00
|
|
|
# It's not meant to include all string constants or anything, just the ones that are important for functioning.
|
2023-11-22 15:34:24 +01:00
|
|
|
|
2023-11-22 15:31:36 +01:00
|
|
|
APP_NAME = 'hanabi-league'
|
2023-11-22 17:13:44 +01:00
|
|
|
DB_CONFIG_FILE_NAME = 'db_config.yaml'
|
|
|
|
CONFIG_FILE_NAME = 'config.yaml'
|
2023-11-22 15:31:36 +01:00
|
|
|
|
|
|
|
DEFAULT_DB_NAME = 'hanabi-league'
|
|
|
|
DEFAULT_DB_USER = 'hanabi-league'
|
|
|
|
DEFAULT_DB_PASS = 'hanabi-league'
|
2023-11-22 16:00:26 +01:00
|
|
|
|
|
|
|
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'
|
2023-11-22 16:21:30 +01:00
|
|
|
DEFAULT_DB_CONFIG_PATH = 'install/default_db_config.yaml'
|
2023-11-22 17:13:44 +01:00
|
|
|
DEFAULT_CONFIG_PATH = 'install/default_config.yaml'
|
2023-11-22 18:56:08 +01:00
|
|
|
|
2023-12-19 22:19:15 +01:00
|
|
|
VARIANTS_JSON_URL = 'https://raw.githubusercontent.com/Hanabi-Live/hanabi-live/main/packages/game/src/json/variants.json'
|
2023-11-22 18:56:08 +01:00
|
|
|
|
2023-11-22 23:35:47 +01:00
|
|
|
FORBIDDEN_GAME_OPTIONS = [
|
|
|
|
"deckPlays"
|
|
|
|
, "emptyClues"
|
|
|
|
, "oneExtraCard"
|
|
|
|
, "oneLessCard"
|
|
|
|
, "allOrNothing"
|
|
|
|
, "detrimentalCharacters"
|
|
|
|
]
|
2023-11-24 13:12:41 +01:00
|
|
|
|
2023-11-24 13:14:01 +01:00
|
|
|
# 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.
|
2023-12-22 11:20:58 +01:00
|
|
|
USER_HISTORY_CACHE_TIME = 60 * 60
|
2023-11-24 17:15:38 +01:00
|
|
|
|
|
|
|
# Fraction of seeds which is assumed to be unwinnable
|
|
|
|
UNWINNABLE_SEED_FRACTION = 0.02
|
2023-12-03 21:19:36 +01:00
|
|
|
|
|
|
|
WEBSITE_OUTPUT_DIRECTORY = 'build'
|
2024-01-13 14:27:45 +01:00
|
|
|
|
2024-01-13 15:35:49 +01:00
|
|
|
ENDGAME_MAX_DRAW_PILE_SIZE = 15 # Not interested in game states with more than 15 cards, this should be enough.
|
2024-01-13 14:27:45 +01:00
|
|
|
ENDGAME_MEMORY_BYTES = 4 * 1024 * 1024 * 1024 # 4 GB of memory
|
2024-01-13 15:35:49 +01:00
|
|
|
ENDGAME_TIMEOUT_SECONDS = 60 * 15 # 15 Minutes per game by default
|
|
|
|
ENDGAME_ANALYSIS_QUERY_INTERVAL_MINUTES = 5 # Re-query database every 5 minutes
|