Skip to content

Instantly share code, notes, and snippets.

deserialize: function(str) {
//var timer = Game.getUsedCpu();
if (str == null)
str = "02161101101010100121222222222222222222222222222222222222222222";
var path = [];
for (var i = 0; i < (str.length - 4) / 2; ++i) {
path.push({x: 0, y: 0, dx: 0, dy: 0, direction: 0});
}
var pos = [0, 0];
var loc = 0;