Post

Replies

Boosts

Views

Activity

Reply to Swift Playgrounds Learn to Code 2 "Moving Further Forward" Page
I stumbled on the exact same question and I'm having the same issues in searching for answers. I'm still learning Swift, but the answers here - https://stackoverflow.com/questions/36996012/how-can-i-allow-my-function-to-accepts-two-different-objects-in-swift match my previous programming experience. You can use class inheritance, either inheriting from another class that implements the method or from a protocol (which seems similar to an interface in C#). But the question here is what is the class or protocol that implements the moveForward() function?
Aug ’20