Eingedeutscht, mit 🍯 #1

Merged
christofsteel merged 1 commit from christofsteel-main-patch-82919 into main 2022-02-01 12:49:47 +01:00
5 changed files with 31 additions and 27 deletions
Showing only changes of commit 2575d9c07c - Show all commits

View file

@ -10,41 +10,41 @@ export const InfoModal = ({ isOpen, handleClose }: Props) => {
return ( return (
<BaseModal title="How to play" isOpen={isOpen} handleClose={handleClose}> <BaseModal title="How to play" isOpen={isOpen} handleClose={handleClose}>
<p className="text-sm text-gray-500"> <p className="text-sm text-gray-500">
Guess the WORDLE in 6 tries. After each guess, the color of the tiles Rate das 🍯le in 6 Versuchen. Nach jedem Versuch ändert sich die Farbe des Kästchens
will change to show how close your guess was to the word. um anzuzeigen, wie nah man an der korrekten Lösung ist.
</p> </p>
<div className="flex justify-center mb-1 mt-4"> <div className="flex justify-center mb-1 mt-4">
<Cell value="W" status="correct" /> <Cell value="I" status="correct" />
<Cell value="M" />
<Cell value="K" />
<Cell value="E" /> <Cell value="E" />
<Cell value="A" />
<Cell value="R" /> <Cell value="R" />
<Cell value="Y" />
</div> </div>
<p className="text-sm text-gray-500"> <p className="text-sm text-gray-500">
The letter W is in the word and in the correct spot. Der Buchstabe I ist an der korrekten Stelle.
</p> </p>
<div className="flex justify-center mb-1 mt-4"> <div className="flex justify-center mb-1 mt-4">
<Cell value="P" /> <Cell value="B" />
<Cell value="I" /> <Cell value="L" />
<Cell value="L" status="present" /> <Cell value="U" status="present" />
<Cell value="O" /> <Cell value="M" />
<Cell value="T" />
</div>
<p className="text-sm text-gray-500">
The letter L is in the word but in the wrong spot.
</p>
<div className="flex justify-center mb-1 mt-4">
<Cell value="V" />
<Cell value="A" />
<Cell value="G" />
<Cell value="U" status="absent" />
<Cell value="E" /> <Cell value="E" />
</div> </div>
<p className="text-sm text-gray-500"> <p className="text-sm text-gray-500">
The letter U is not in the word in any spot. Der Buchstabe U ist in dem Wort enthalten, aber an der falschen Stelle.
</p>
<div className="flex justify-center mb-1 mt-4">
<Cell value="W" />
<Cell value="A" />
<Cell value="B" />
<Cell value="E" status="absent" />
<Cell value="N" />
</div>
<p className="text-sm text-gray-500">
Der Buchstabe E ist nicht in dem Wort enthalten.
</p> </p>
</BaseModal> </BaseModal>
) )

View file

@ -14,7 +14,7 @@ export const StatsModal = ({ isOpen, handleClose, gameStats }: Props) => {
<BaseModal title="Statistics" isOpen={isOpen} handleClose={handleClose}> <BaseModal title="Statistics" isOpen={isOpen} handleClose={handleClose}>
<StatBar gameStats={gameStats} /> <StatBar gameStats={gameStats} />
<h4 className="text-lg leading-6 font-medium text-gray-900"> <h4 className="text-lg leading-6 font-medium text-gray-900">
Guess Distribution Rateverteilung
</h4> </h4>
<Histogram gameStats={gameStats} /> <Histogram gameStats={gameStats} />
</BaseModal> </BaseModal>

View file

@ -18,7 +18,7 @@ export const WinModal = ({
handleShare, handleShare,
}: Props) => { }: Props) => {
return ( return (
<BaseModal title="You won!" isOpen={isOpen} handleClose={handleClose}> <BaseModal title="Richtig 🐻❤️🍯!" isOpen={isOpen} handleClose={handleClose}>
<div> <div>
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100"> <div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100">
<CheckIcon className="h-6 w-6 text-green-600" aria-hidden="true" /> <CheckIcon className="h-6 w-6 text-green-600" aria-hidden="true" />

View file

@ -3,7 +3,7 @@ import { solutionIndex } from './words'
export const shareStatus = (guesses: string[]) => { export const shareStatus = (guesses: string[]) => {
navigator.clipboard.writeText( navigator.clipboard.writeText(
`Not Wordle ${solutionIndex} ${guesses.length}/6\n\n` + `🍯le ${solutionIndex} ${guesses.length}/6\n\n` +
generateEmojiGrid(guesses) generateEmojiGrid(guesses)
) )
} }

View file

@ -14,10 +14,14 @@ export const isWinningWord = (word: string) => {
export const getWordOfDay = () => { export const getWordOfDay = () => {
// January 1, 2022 Game Epoch // January 1, 2022 Game Epoch
const epochMs = new Date('January 1, 2022 00:00:00').valueOf()
const now = Date.now()
const msInDay = 86400000
const index = Math.floor((now - epochMs) / msInDay)
return { return {
solution: WORDS[0].toUpperCase(), solution: WORDS[0].toUpperCase(),
solutionIndex: 0, solutionIndex: index
} }
} }