PokemonKata in Swift 2.2
Make sure to remove the -XC7
part from the folder name when checking it out. Otherwise XCode will not recognize the project as a playground.
Make the test pass by implementing code that finds the Pokemon that's nearest to the player location and is a normal Pokemon. Hint: It's Mewtwo.
Don't use for
, forEach
, while
or any other classical loop concept. Also don't bridge arrays over to Objective-C.
The idea is to use functional concepts to solve this problem.