diff --git a/package.json b/package.json index f10fc8f..03670ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "word-guess", - "version": "1.0.0", + "version": "1.1.0", "private": true, "main": "src/index.tsx", "homepage": "./", diff --git a/src/components/Playing/Lives.tsx b/src/components/Playing/Lives.tsx index 3c1e79d..45fa288 100644 --- a/src/components/Playing/Lives.tsx +++ b/src/components/Playing/Lives.tsx @@ -7,8 +7,8 @@ interface LivesProps { const Lives: React.FunctionComponent = (props: LivesProps) => { return ( - { [...Array(props.remaining)].map((e, i) => <>♥ ) } - { [...Array(props.count - props.remaining)].map((e, i) => <>♡ ) } + { [...Array(props.remaining)].map((e, i) => ) } + { [...Array(props.count - props.remaining)].map((e, i) => ) } ) } diff --git a/src/components/Start/StartForm.tsx b/src/components/Start/StartForm.tsx index 9e826fd..6f83906 100644 --- a/src/components/Start/StartForm.tsx +++ b/src/components/Start/StartForm.tsx @@ -8,7 +8,7 @@ function seed(word: string) { let seed = 0 Object.values(word.split("")).forEach(letter => { if (letter === " ") { - seed += BASE + seed += 0 } else { seed += letter.charCodeAt(0) - 65 + 1 } @@ -23,8 +23,7 @@ function word(seed: number) { seed /= BASE seed = Math.floor(seed) const letter: number = seed % BASE - console.log(letter) - if (letter === BASE) { + if (letter === 0) { word += ' ' } else { word += String.fromCharCode(letter + 65 - 1)