Word-Scramble-iOS-Swift-UI
Word Scramble is an iOS, Swift UI project with these implementaions:
- Loading assets into a project
- Parsing data from a text file/list into an array
- Keyboard input
- Removing AutoCapitalisation
- Removing AutoCorrect
- Autofocusing the input field
- Implementing game logic and rules
- Handling errors and communicating back to the user
- Building a List View from user generated words
- UI Toolbar Group
- Custom alerts to alert rule breaking
The aim of the game is to build as many of your own words as possible using the letters from a root word.
The rules are:
- You can only use the letters that are in the root word.
- You can only use each letter once.
- You cannot use more letters than there are.
- Your words need to be real English words, spelled correctly.
- Your words needs a minimum length of 3 characters.
- You cannot enter the same word twice.
- You cannot enter the root challenge word itself.
I also created an extension that implements additional features to my base project:
- Calculate all possible words from all possible permutations of the root letters.
- Communicate to the user the total "word space" of how many new words are possible to create.
- Update how many have been discovered out of the total word space.
- Additional scrabble dictionary list asset for checking all possible words.
- An improved scoring system that scales rewards based on word length.
In this implementation I discovered:
- The advantages of using Set<> over Array<> for it's Big O(1) access speed.