Created
July 7, 2013 21:17
-
-
Save nvenegas/5945009 to your computer and use it in GitHub Desktop.
Navigation systems for Bit's Quest — http://bitsquest.bitbucket.org/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bit = this; | |
function navigate(thruster) { | |
return function () { | |
bit.thrusters[thruster](true); | |
return { | |
stop: function () { | |
bit.thrusters[thruster](false); | |
} | |
}; | |
}; | |
} | |
var north = navigate('bottom'); | |
var east = navigate('left'); | |
var south = navigate('top'); | |
var west = navigate('right'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment