diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-13 12:48:48 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-13 18:49:00 +0200 |
commit | 4d7bdc955a2e6dd2c222f985c7fbc9b4febbccc4 (patch) | |
tree | a344e7c011b07e83ab0abf57e1aa043a9a81dff2 /public | |
parent | 88d909a874499f9d3d18e76ff30c1155caa2e48e (diff) | |
download | server-4d7bdc955a2e6dd2c222f985c7fbc9b4febbccc4.tar.gz |
Tournaments!
Diffstat (limited to 'public')
-rw-r--r-- | public/docs/index.html | 4 | ||||
-rw-r--r-- | public/docs/tips.html | 2 | ||||
-rw-r--r-- | public/docs/tournaments.html | 81 | ||||
-rw-r--r-- | public/join.js | 14 | ||||
-rw-r--r-- | public/style.css | 23 |
5 files changed, 115 insertions, 9 deletions
diff --git a/public/docs/index.html b/public/docs/index.html index f983b89..9adfdbb 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -18,13 +18,11 @@ server instance and how to create new modules. <ul> <li><a href="tips.html">Tips & tricks.</a> +<li><a href="tournaments.html">Tournaments</a> </ul> <h2>For developers</h2> -<p> -Before you start to develop a module, you will need to run a local instance of the server. - <ul> <li><a href="install.html">Installing the server.</a> <li><a href="production.html">Running a public server.</a> diff --git a/public/docs/tips.html b/public/docs/tips.html index 518ebe5..5a2b25a 100644 --- a/public/docs/tips.html +++ b/public/docs/tips.html @@ -68,7 +68,7 @@ Use <kbd>Enter</kbd> and <kbd>Escape</kbd> to quickly open and close the chat bo <p> The <img src="/images/cycle.svg"> button appears when the game is over. -Use this to quickly start a rematch with the same players. +Use this to quickly start a rematch with the same players, or to go to the tournament score page. <p> The <img src="/images/earth-africa-europe.svg"> button hides all counters and markers. diff --git a/public/docs/tournaments.html b/public/docs/tournaments.html new file mode 100644 index 0000000..6122194 --- /dev/null +++ b/public/docs/tournaments.html @@ -0,0 +1,81 @@ +<!doctype html> +<meta name="viewport" content="width=device-width"> +<title>Tournaments</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Automated Tournaments +</h1> + +<p> +These are the tournaments that are managed by the computer. + +<p> +To play in one of these tournaments, simply register and wait. +Once enough players have joined, the tournaments will kick off automatically. +Make sure you've turned on notifications so you don't miss the start! + +<hr> + +<h3>Time Control</h3> + +<p> +All tournament games use time control. +<p> +If you let a tournament game time out, you will not be allowed to join future tournaments! + +<h3>Rounds</h3> + +<p> +Tournaments are round-robin, where each player meets every other player. +Everyone plays each side the same number of times. +There may be a few exceptions to these rules in 3+ player games at certain +player counts, but the system attempts to make the pairings as fair as possible. + +<p> +With sequential rounds you will only play one game at a time. + +<p> +With concurrent rounds you will play several games simultaneously; +but never the same side in more than one game at a time. + +<h3>Points</h3> +<p> +Victories are worth 2 points; ties and shared victories are worth 1 point. +The +<a href="https://en.wikipedia.org/wiki/Sonneborn%E2%80%93Berger_score">Sonneborn-Berger</a> +score is used to break ties. + +<h3>Levels</h3> + +<p> +Some tournaments may have multiple levels. If you win a tournament at one +level, you will automatically be queued for the next level up. + +<hr> + +<h2> +Mini Cup +</h2> + +<p> +This is a small and fast tournament format for casual play. +The mini cup starts as soon as the required number of players have +entered. +You can play any number of mini cups. + +<p> +The mini cup games use fast (3+ moves/day) time control. + +<hr> + +<h2> +Championship +</h2> + +<p> +To be done... + +<hr> diff --git a/public/join.js b/public/join.js index 75e7aca..b2c667f 100644 --- a/public/join.js +++ b/public/join.js @@ -327,13 +327,19 @@ function create_game_list() { let table = create_element(window.game_info, "table") let list = create_element(table, "tbody") - if (game.scenario !== "Standard") - create_game_list_item(list, "Scenario", game.scenario) - create_game_list_item(list, "Options", format_options(game.options)) + if (game.pool_name) { + create_game_list_item(list, "Tournament", `<a href="/tm/pool/${game.pool_name}">${game.pool_name}</a>`) + } else { + if (game.scenario !== "Standard") + create_game_list_item(list, "Scenario", game.scenario) + create_game_list_item(list, "Options", format_options(game.options)) + } + if (game.pace > 0) create_game_list_item(list, "Pace", PACE_TEXT[game.pace]) - create_game_list_item(list, "Notice", game.notice) + if (!game.pool_name) + create_game_list_item(list, "Notice", game.notice) if (game.status === 0) { if (game.owner_id) diff --git a/public/style.css b/public/style.css index 0228687..0792dd1 100644 --- a/public/style.css +++ b/public/style.css @@ -241,9 +241,20 @@ table.wide { } table.half { - min-width: 50%; + width: 100%; + max-width: 400px; } +table.seeds td:nth-child(2) { text-align: right; } +table.pools td:nth-child(2) { text-align: right; } +table.seeds td:nth-child(3) { width: 24px; text-align: right; } +table.pools td:nth-child(3) { width: 24px; text-align: right; } + +table.pools a { color: var(--color-black); text-decoration: none; } +table.pools a:hover { color: var(--color-blue); text-decoration: underline; } +table.seeds a { color: var(--color-black); text-decoration: none; } +table.seeds a:hover { color: var(--color-blue); text-decoration: underline; } + thead, th { background-color: var(--color-table-head); } @@ -268,6 +279,7 @@ table.striped tr:nth-child(2n) { td.r, th.r { text-align: right; } td.w, th.w { white-space: nowrap; } +td.n, th.n { width: 0px; white-space: nowrap; text-align: right; } /* FORUM AND MESSAGE POSTS */ @@ -309,6 +321,15 @@ div.body img { margin: 16px 0; } +.tour_list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(0, 400px)); + gap: 24px; + margin: 16px 0; +} + +.tour_list table { margin: 0 } + .game_item { border: var(--thin-border); box-shadow: var(--drop-shadow); |