Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F6702977
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
epriestley
Aug 8 2019, 7:05 PM
2019-08-08 19:05:29 (UTC+0)
Size
1005 B
Referenced Files
None
Subscribers
None
raw.txt
View Options
let x = parseInt(GRID_SIZE/2);
let y = parseInt(GRID_SIZE/2);
function jumpTo(instructions, px, py) {
moveRelative(instructions, px - x, py - y);
}
function moveRelative(instructions, rx, ry) {
instructions.push({moveX: rx, moveY: ry});
x = x + rx;
y = y + ry;
}
function crawlTo(instructions, px, py) {
while (px < x) {
moveRelative(instructions, -1, 0);
}
while (px > x) {
moveRelative(instructions, +1, 0);
}
while (py < y) {
moveRelative(instructions, 0, -1);
}
while (py > y) {
moveRelative(instructions, 0, +1);
}
}
(() => {
const GRID_SIZE = 31;
const instructions = [];
for (var ring = 0; ring <= 15; ring++) {
var sx = ring;
var sy = ring;
var tx = (GRID_SIZE - ring) - 1;
var ty = (GRID_SIZE - ring) - 1;
jumpTo(instructions, sx, sy);
crawlTo(instructions, tx, sy);
crawlTo(instructions, tx, ty);
crawlTo(instructions, sx, ty);
crawlTo(instructions, sx, sy + 1);
}
return instructions;
})();
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
1769661
Default Alt Text
raw.txt (1005 B)
Attached To
Mode
P2122 synthace.js
Attached
Detach File
Event Timeline
Log In to Comment