Transformation

in ita •  2 months ago 

import java.util.Collections
import java.util.ArrayList

class SecretHandshake {

static List<String> commands(int number) {
    def res = new ArrayList()
    if (number & 1) res << "wink"
    if (number & 2) res << "double blink"
    if (number & 4) res << "close your eyes"
    if (number & 8) res << "jump"
    if (number & 16) Collections.reverse(res)  
    return res       
}

}

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
image.png
please click it!
image.png
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)

The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.