screeps/NOTES.js

7 lines
217 B
JavaScript
Raw Normal View History

2016-09-23 00:12:42 -05:00
serializePos: function(pos) {
return pos.x + '_' + pos.y + '_' + pos.roomName;
},
deserializePos: function(str) {
var ar = str.split('_');
return new RoomPosition(ar[0], ar[1], ar[2]);
},