# Crown Cryptic Design Document
Codebase:[Github](https://github.com/Fordcois/crown-cryptic)
Design Document Written in Collaboration between [Sam Ford](https://github.com/Fordcois) & [Rachel Roberts](https://github.com/Rachel853)
### Objective
A web application that allows users to solve a daily cryptic crossword clue
### Overview
Crown Cryptic is a mobile web application in the style of Wordle. Each day a new cryptic crossword clue will be available. Users input the answer using an onscreen keyboard and if correct, a pop-up says congratulations and allows users to share with their friends.
### Features
* No need to log in or register an account
* Daily cryptic clue
* Answer to be entered by the onscreen keyboard
* If the user is stuck, they can ask for a clue
* First clue will reveal the indicator/definition
* Players can also request letters if they are unsure
* A shareable message to promote your score upon completion 'I solved with X clues, X letters' to friends which will help promote the site
### Tech Stack
The application will be written in JavaScript and NextJS, a modern JavaScript framework.
The application will be deployed using Vercel due to the ease of it being built with NextJS.
### UI & Design
The design should be simple, clean, and mobile-first.
[Figma Mock-up](https://www.figma.com/proto/MU6UagXDGSGhVlMFicNLFC/Crown-Cryptic?node-id=1-5&t=ta966i64D5ILQSvX-1)
### Code Structure
Clues will be stored as JSON and loaded depending on the day. This way no backend is needed and information can be loaded ahead of time.
## Considerations & Discussions
#### Clue Formats
* Spaces in clues? How should these be visualized? As one word or with a gap in the line?
#### Including a timer as part of the website
Pros:
- Enhances sharing and competition by providing a score based on time, rather than just clues used.
- Emphasises speed, adding a reason for having only one clue.
Cons:
- Crosswords are typically not speed-based events.
- Reduces the thoughtful aspect, encouraging a "solve quickly or give up" mindset.
- May inspire cheating.
- Difficulty in directly comparing scores with friends, especially if hints are used, making time comparisons ambiguous - Is a faster solve with more hints better than slower with no hints?
**Due to these reasons, we have decided against including a timer for now. However, it might be implemented later, potentially as a user-toggleable feature.**
#### Clues & Letter hints
A clue will reveal the definition part of the question which will help the user know what they're looking for - This will also allow us to use external data more easily as it means custom clues will not have to be written
The second type of clue will be to reveal a letter in the answer - There are discussions as to how this should be handled
#### How Should Letters Be Given?
- **Randomised**: This can be unfair as each clue might not be the same for each player depending on the letters given meaning that 3 clues for one player may be different to using 3 clues for another player.
- **Patterned**: Consistent for each player, although not necessarily useful in solving the clue.
- **Player Selection: Adds an element of skill as players choose which letter to ask for - After discussion this is probably the one we will move forward with**
#### Navigation
Discussions were had about the best way for the selected square to move in a way that felt organic
**Locking in Letters**: When a letter is given as a clue, it should feel "locked in" and become unselectable or unchangeable by the user but it needs to be clear to the user this is happening and distinguish locked letters.
**Looping Back**:One idea was to loop back to the first non-revealed letter square from either the beginning (if not deleting) or from the end (if deleting) when reaching the last square. However, this might be too unpredictable and annoying for the user. Therefore, the current setup remains, where the selection does not move further if it reaches the end of the squares in the respective direction.
**Moving to the Next Empty Square**: Another consideration was to move to the next empty square, skipping squares where the user has already input a letter. While this could prevent some annoying scenarios, it might introduce other frustrations. Thus, we have decided against this change for now.
### Future Scope
* Server side element? Tracks how many solves each day? You are the 100th person to complete it today - Using Less clues than 75% of players
* Completed Status stored in a cookie so the puzzle can only be done once each day
* Rather than a single clue, the daily puzzle could be multiple clues in a grid
* A timer for the puzzle that gets shared with the score
* Play previous days clues