-
Write down an algorithm in English how you would swap the values in two variables.
For example two players want to swap two objects:
playerOneObject = "Torch"
playerTwoObject = "Gold"
How would you swap the objects so playerOneObject is "Gold" and playerTwoObject is "Torch"?
Note, the objects can change over time so you cannot assume the objects will always be a "Torch" and "Gold".
-
Swap your algorithm with a partner and test it to determine if it works or not.