Group Group Group Group Group Group Group Group Group

Full Solution for Chapter 18 (Swift Apprentice, V3), Challenge 3 - Character Battle

I’m trying to code the solution for Challenge 3, Character Battle, but I’m stuck!

Unfortunately the playground that came with the book doesn’t include the solution, just the test cases that are already shown in the book’s text.


Nevermind! I expanded the file pane on the left in Xcode for the downloaded challenges playground, and found the code I was looking for.

It sure helps to step away from the keyboard for awhile, as that’s when the solution finds you! :slight_smile:

Edit: Just saw you figured it out, Nice!!

Right, the test cases are in the playground page file.

The magic is found in it’s :file_folder: Sources folder which contains Characters.swift

Hot key: ⌘0 will Open/Close the Navigator
The Project Navigator (Hot key ⌘1) contains all the files for the project.

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.