Sha256: a9cf84ad72eb86509a6f9678fe3dbd06ba53e5bdcd49913e8816f6720a41ff79

Contents?: true

Size: 592 Bytes

Versions: 72

Compression:

Stored size: 592 Bytes

Contents

/**
* Here is an example solution for the SecretHandshake exercise
*/
component {

	function commands( input ) {
		var handshake = [];
		// 1
		if( bitMaskRead( input, 0, 1 ) ) {
			handShake.append( 'wink' );
		}
		// 10
		if( bitMaskRead( input, 1, 1 ) ) {
			handShake.append( 'double blink' );
		}
		// 100
		if( bitMaskRead( input, 2, 1 ) ) {
			handShake.append( 'close your eyes' );
		}
		// 1000
		if( bitMaskRead( input, 3, 1 ) ) {
			handShake.append( 'jump' );
		}
		// 10000
		if( bitMaskRead( input, 4, 1 ) ) {
			handShake = handShake.reverse();
		}
		return handShake;
	}
			
}

Version data entries

72 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.44 tracks/cfml/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.43 tracks/cfml/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.42 tracks/cfml/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.41 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.41 tracks/cfml/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.40 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.39 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.38 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.37 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.36 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.35 tracks/coldfusion/exercises/secret-handshake/Solution.cfc
trackler-2.2.1.34 tracks/coldfusion/exercises/secret-handshake/Solution.cfc