I created this app as my final project to fulfill the Udacity iOS Nanodegree program. It's a scorekeeping app for the card game Oh Hell.
This app is written in Swift version 5.9. The project requires Xcode version 15. The minimum depoyment target is iOS 16.2.
- To just play around with this app, follow the instructions below. Enter test data for all inputs.
- To use it as a companion app while you play Oh Hell, first gather your players and a deck of cards, then follow the instructions below.
The first screen will appear with helper text to get you started. Tap the + icon in the top right corner to start a game.
The "New Game" screen will appear.
Use the + and - buttons to enter the number of players. You must have a minumum of 3 players and no more than 8 players.
Next, enter your player names into the text fields. 3 textfields will show by default. If you add more than 3 players per instructions above, a new textfield will appear for each additional player. If you reduce the number of players, the number of textfields will update accordingly.
Use the + and - buttons to choose the maximum number of cards.
2 cards is the lowest you can select. The maximum number of cards will update based on the number of players. For example, if you're playing with 3 players, the maximum number of cards will be capped out at 17; if you're playing with 5 players, the maximum number of cards will be capped out at 10, etc.
Then select whether you want to play in descending or ascending order.
- Descending order - Your first round will start with the maximum hand size. Then each subsequent round will descend incrementally to 1 card (first round: 17 cards; second round: 16 cards; third round: 15 cards, etc.), then ascend incrementally to the maximum hand size.
- Ascending order - Your first round will start with 1 card. Then each subsequent round will ascend incrementally to the maximum hand size, then descend incrementally to 1 card.
Click the Start Game button when you're ready.
Note: This app allows you to play as few or as many rounds as you want. You can end the game at any time and save the game results to your game history. Once a game is ended, you can't continue playing that same game again. You have to start a new game from scratch.
The "Game" screen will appear. The round number, dealer name, and hand size will appear at the top of the screen to help you keep track of each round.
Each player is assigned an avatar generated from the DiceBear API. The player names themselves are used to generate and retrieve the images.
Enter the bid for each player. Only integers are accepted, with a maximum of 2 digits.
Note: The total number of bids entered cannot equal the hand size. For example, if the hand size is 5, the sum of the bids cannot equal 5. In this scenario, an alert will appear to instruct you to enter a different bid in the last player/bid field. You cannot proceed until the bid has been updated.
After you finish playing a round, select the checkmark on the segmented controls for each player who won their bid.
The "+" column calculates the number points each player received based on whether they won their bid.
The "Score" column tracks the total points per player as each round is played.
To play the next round, tap the Next Round button.
If you realize someone made a mistake (misdealt the cards, etc.) in given round, you can restart the round.
Tap the ellipsis icon in the top right of the screen, then select Restart Round. The round data will reset.
As noted above, this app is designed to allow you to play as few or as many rounds as you want. When you're ready to end the game, tap the ellipsis icon in the top right of the screen, then select End Game. An alert will appear asking you to confirm whether you want to end the game. Tap End Game.
The "Winner" screen will appear.
If you have a tied game, the winner names will be displayed. Tap the Done button.
If you have a single winner, the winner name will be displayed along with a textfield where the winner can provide a "victory quote". You must enter a victory quote in order to proceed. Then tap the Done button.
The "Game History" screen will appear. Your game will be listed at the top of the table. Each game displays the following data:
- Winner avatar (Note for ties: a 3-person image displays for all tied games)
- Winner name(s)
- Date of game
- Score
- Victory quote (Note for ties: "Tied Victories!" displays for all tied games)
Games are listed in descending order by date (e.g., most recent games are shown at the top).