not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
601 B

define(function (require) {
var directions = {};
directions.orders = ['north', 'east', 'south', 'west'];
directions.orders.forEach(function (dir, i) {
directions[dir] = i;
});
directions.getOpposite = function (direction) {
switch(direction) {
case 'north':
return 'south';
break;
case 'south':
return 'north';
break;
case 'east':
return 'west';
break;
case 'west':
return 'east';
break;
}
}
return directions;
});