Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/components/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ export class Game {
const gridState = this.#grid.getState()
const statistics = this.#grid.getStatistics(gridState)

const content = [`Path#${id} | ${size} | ${statistics.hiddenWordsGuessed}/${statistics.hiddenWordCount}`]

if (mode === Grid.Modes.Challenge) {
content.push(`Score: ${statistics.score} / ${statistics.bestPossible} (${statistics.progress})%`)
}
const content = [
`Path#${id} | ${size}` + (
mode === Grid.Modes.Challenge
? ` | ${statistics.score}/${statistics.bestPossible}`
: ''
)
]

let moves = ''
const lastMovesIndex = statistics.moves.length - 1
Expand Down