I used XCode and Swift and a really handy tutorial by CodeWithChris.com. My app is the card game, War, which is a really simple card game. I used the arc4random_uniform function to get a random number from 0-12 and then called different cards from the array corresponding to those random numbers. Whichever player has the higher card would get a point and their total at the bottom of the screen would update. The hardest part of the making the game was probably figuring out all the autolayout stuff. It was really cool learning Swift though because the syntax is so different than other languages I know (no semicolons!???? or parentheses around if statement conditions??!!!). Here are some screenshots from when I first finished the game last night.
One of my friends suggested adding a way to clear/end the game without having to restart the app. I did that this morning by adding a "clear" button that will reset the players' totals.
Teaching myself iOS development was a really fun experience so far and I'm excited to make more apps :D

No comments:
Post a Comment