diff --git a/WordleWithFriends/How To Play/GameInstructionsViewController.swift b/WordleWithFriends/How To Play/GameInstructionsViewController.swift index 2cabfa5..b7efd78 100644 --- a/WordleWithFriends/How To Play/GameInstructionsViewController.swift +++ b/WordleWithFriends/How To Play/GameInstructionsViewController.swift @@ -56,7 +56,7 @@ final class GameInstructionsViewController: UIViewController { let row = WordGuessRowView() var guess = WordGuess(guess: "GEOFF") guess.mark(2, as: .correct) - row.configure(with: guess) + row.configureExample(with: guess) return row }() @@ -74,7 +74,7 @@ final class GameInstructionsViewController: UIViewController { let row = WordGuessRowView() var guess = WordGuess(guess: "APPLE") guess.mark(3, as: .misplaced) - row.configure(with: guess) + row.configureExample(with: guess) return row }() @@ -92,7 +92,7 @@ final class GameInstructionsViewController: UIViewController { let row = WordGuessRowView() var guess = WordGuess(guess: "PARKS") guess.mark(0, as: .incorrect) - row.configure(with: guess) + row.configureExample(with: guess) return row }() @@ -151,3 +151,13 @@ final class GameInstructionsViewController: UIViewController { dismiss(animated: true) } } + +private extension WordGuessRowView { + func configureExample(with wordGuess: WordGuess) { + removeAllArrangedSubviews() + wordGuess.forEach { letterGuess in + let tile = LetterTileView(letterGuess: letterGuess) + addArrangedSubview(tile) + } + } +}