Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need help to swift IOS

Hello


I am a new dev in swift, A have made a word game.

there are five letters you have to spell a word.

Of the five letters can be possible to spell more words.

I have all the words in a file.

for example.



<string>BRUSH.SHRUB</string>


<string>SKINS.SINKS</string>


<string>SIREN.RESIN.RISEN</string>


<string>DISKS.SKIDS</string>


<string>NAILS.SNAIL.SLAIN</string>


<string>SMILE.LIMES.MILES</string>


The game works fine with three words, but there is actually simple times it is possible to spell five different words, but can not get the game to work with five words


It is in this code, someone who can help?


// CHECK RESULTS ======================================

func checkResult() {

// YOU'VE GUESSED THE WORD!

firstWord = stringsArray[0]

ifstringsArray.count == 2 {

secondWord = stringsArray[1]

}

ifstringsArray.count == 3 {

secondWord = stringsArray[1]

thirdWord = stringsArray[2]

}

ifwordByCharacters == firstWord ||

wordByCharacters == secondWord ||

wordByCharacters == thirdWord {

iPhone 6, iOS 8.3, IOS SWIFT

Posted on May 23, 2015 8:43 AM

Reply

There are no replies.

Need help to swift IOS

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.