- for the inGame view, add a component that indicates how many rounds there are and what the current round is.
- it should take up a single like and say "Round 1/5"
- After the text, use an minimal svg chart that resembles a subway map. each round is a circle, and as the game progresses, the current round is visually indicated (through color and an additional outline)
-
pick a complete coherent color pallet: use a dark background and light text. maintain color-blind friendly coloring for valid and invalid words, but you can pick new colors.
-
the size of the text in the prompt-title should be smaller than the prompt-constraint.
-
ensure that the height of the in-game element never changes and fully fills the screen on mobile.
- the longest prompt size in the current dataset is under 60 characters. Ensure that 75 characters fits cleanly.
- include logic to responsively size the text when greater than 70 characters.
-
use the same header component across all states. start with this, but make it its own component so we can tweak later
-
refactor if needed and add comments and documentation so that is is easy to adjust the color palette
-
change it back to something with dark text on a light background
-
on postGame view, the results table would be the full width of the screen/gameContainer.
-
the gameContainer shouldn't grow in width, once the text gets too long, resize the text
Don't make code changes outside of this file. Help me edit this prompt so that Townie with Claude Opus 4.5 gives best results.
I want to change the postgame workflow to support club leaderboards.
After the user gets their scored results,
-
header
-
resultsTable
-
clubNameInput
-
userNameInput
-
submitToLeaderboardButton
-
club names should be a string of only 26 letters in the alphabet. no digits or other characters or spaces.(ie, can be input using the keyboard component)
-
club names should be no more than 25 characters long
likewise for players:
- player names should be a string of 26 letters in the alphabet. no digits or other characters or spaces.(ie, can be input using the keyboard component)
- player names should be no more than 25 characters long
each submission gets a unique id, two players can submit with the same userName and clubName
Here's what I was thinking for data needed to be collected to support the leaderboard view. Although submitted at is not currently needed, it should be included. if this is insufficient, or could be handled better, make those changes.
-
submission_id
-
game_id
-
club_name
-
user_name
-
submitted_at: timestamp when the user submitted to finish the final round, ending the game.
-
total_points: sum of length of every valid submission, as displayed on the postGame resultsTable.
-
submissions: array of strings containing the words the user played, in order
-
submission_validity : array of booleans of same length of submission, true for valid words and false for invalid,
-
create a file scripts/initDbResults.ts to initialize a game_results table where these are stored.
- add leaderboard as a gameState.
- the user transitions to the leaderboard state after they press the submitToLeaderboardButton
- the leaderboard view displays a scrollable table with the results of every submission of to that club.
- the results should be sorted by default from most total points to least
- reuse the roundIndicator, but with an extra unconnected dot for total points, to allow the user to change the sort order to sort by round.
- if two users have the same total points, use the username as a tiebreaker for sort order.
- if two users have the same number of points for a round, use the submitted word as the first tiebreaker, followed by user_name.
- The club name should be autopopulated (but editable) if the user navigated to the app via a path with "/club/{clubname}/" (or "/club/{clubname}" without the terminal "/")
- if a user inputs the url with a path "/club/{clubname}/leaderboard/" into their browser, that should take them to club leaderboard
- if there are no player submissions with that club name, indicate "nobody in the club has played yet!"
- when the user navigates from the postGame to leaderboard gameState, update the path in the browser as well.
add the edited version below here: