enums and protocol | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

enums and protocol

can anyone explain how to use it!?

3rd Jul 2016, 9:41 PM
Ahmed Jaffer Elgassim
Ahmed Jaffer Elgassim - avatar
2 Antworten
0
enum { case North case South case East case West }
25th Aug 2016, 11:49 AM
Prashant
Prashant - avatar
0
Here is a chunk of code That I created for you. It moves a character back and forth 3 times printing when the edge of the screen is reached and switch the direction. After the third iteration it stops and tellls that the race is completed: http://swiftlang.ng.bluemix.net/#/repl/57c64a92c62de72752d32274
31st Aug 2016, 2:13 AM
Abdelkader Ait Assou
Abdelkader Ait Assou - avatar