Getting Started with AI-Augmented Coding in iOS

Oct 11 2026 · Swift 6, iOS 27, Xcode 27 beta 4

Lesson 02: Building on the Guessing Game

Demo: Using Xcode to Implement Streak Mode

Episode complete

Play next episode

Next
Transcript

Welcome to the second demo of this lesson. In this demo, you’ll implement the first missing feature of the game, the streak mode. There’s some information on how the streak mode works, which basically, very similar to the classic mode, but the game ends when you do the first mistake. Scoring is the same, the game almost works the same. Only difference is, it doesn’t give you the screen, or it doesn’t show the screen for the next hint if you make a mistake. The game ends directly, and you get the final score.

So, let’s give it this rule and see what the agent is able to implement.

The app is missing the implementation of the streak mode. Implement the feature considering the description of this game mode. Streak mode: User takes the risk and continues to play to the next round. The risk is, a wrong guess ends the game instantly, even if clues remain. For the standard user, a wrong guess is nearly free, you just see the next clue. In streak mode, every guess is a real gamble. I'm 80% sure it's Chile, but is 80% enough to bet the whole run?

The prompt is:

The app is missing the implementation of the streak mode. Implement the feature considering the description of this game mode. Streak mode: User takes the risk and continues to play to the next round. The risk is, a wrong guess ends the game instantly, even if clues remain. For the standard user, a wrong guess is nearly free, you just see the next clue. In streak mode, every guess is a real gamble. I'm 80% sure it's Chile, but is 80% enough to bet the whole run?

Let’s see how the implementation works.

As the implementation goes, it’s going to show you the diff of each file modified. Basically, each IDE will build the UI showing how the code is modified and even how the thinking process works. This UI is unique to Xcode. If you try different IDEs as in the next demo, you’ll see how a different IDE represents all this and how to navigate through it.

So now the implementation is done. How about we give it a try? Build and run. Here is the simulator, and here is our app running. Let’s try the new mode that we just implemented.

“This country covers nearly half an entire continent.” Hmm. I think the right country for this one is Brazil. Yes, that was correct. Now, this one is, “This landlocked country has four official national languages.” I think this is Switzerland. Yes, that was correct. Now, this country is also a continent. I’m quite sure that this is Australia, but let’s try a wrong input to see how it works.

Is the rule for the streak mode implemented correctly? Yes, it is. So our score for Brazil and Switzerland, because we got it in the first clue, is 24 each. We missed Australia. And yes, I was right, it was Australia, and the streak ended on two countries in a row.

So it’s up to you if you want to modify it a little bit more to show the score instead, or maintain it as the number of countries, or how long the streak was. In the next demo, we will implement the third and final game mode, Blitz, but we will not use Xcode. See you in the next demo.

See forum comments
Cinema mode Download course materials from Github
Previous: Demo: Introduction to the Guessing Game Next: Demo: Using Cursor to Implement Blitz Mode