Skip to content

kieranb662/Wordle-Guesser

Repository files navigation

Wordle Guesser

This app is a little project/example of how to create composable views in SwiftUI. The idea was to make a tool to see all of the possible remaining words after your first few Wordle guesses.

What The App Does

Technical Stuff

The app does not really have an architecture. I treat the Game object as the viewmodel, fully embracing the use of SwiftUI's built in @EnvironmentObject for managing the state of the application.

For styling the app, I put most everything in the Style.swift file. The commonly used values are generally added as an extension of the type they represent for example:

extension Color {
  static let correctLetterBackground = Color("correct-letter-background")
}

Since this is a primarily English game I decided against moving text into a localizable string file.

Features

  • light/dark mode support
  • Automated screen shotting
  • Haptics
  • Animations
  • Transitions
  • Heavy use of Regex and string parsing
  • iPhone supported
  • iPad supported

How To Generate Screenshots

This app uses fastlane and frameit for generating appstore screenshots of all sizes

Instructions

  • Open Terminal
  • Navigate to the root project folder
  • run bundle exec fastlane snapshot --verbose
  • optionally run bundle exec fastlane frameit download_frames to download the needed frames
  • run bundle exec fastlane frameit
  • check the screenshots/en_us folder for the framed screeshots

Note

Transitions need to be disabled for screenshots to work properly, otherwise the views will not be in the hierarchy for the UI automation

Enhancement Ideas/Practice Problems

This App is ready for anyone to use as a base for learning from. A few fun practice ideas are

  • Create an App Clip
  • Make some Widgets
  • Add a transition for when a letter is selected
  • Try to find some bugs (maybe some inputs don't give the correct remaining guesses?)
  • Redesign the UI for a macCatalyst app
  • Add in a way to display the definitions of a tapped word
  • Make you inputs persist using coredata or firestore to keep track of all your guesses and games.
  • Make the app Localizable.

About

SwiftUI example app for guessing in Wordle

Topics

Resources

License

Stars

Watchers

Forks