<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Path Reversing Script]]></title><description><![CDATA[<p>Hey y'all, I've found myself needing the ability to reverse a path, so I wrote a little script that I'd like to share!</p>
<p><a href="https://gist.github.com/waveofbabies/d4d8e9cfeb47e358f62b" rel="nofollow noreferrer">https://gist.github.com/waveofbabies/d4d8e9cfeb47e358f62b</a></p>]]></description><link>http://screeps.com/forum/topic/1424/path-reversing-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 22:03:08 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/1424.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Aug 2015 21:30:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Path Reversing Script on Invalid Date]]></title><description><![CDATA[<p>Hey y'all, I've found myself needing the ability to reverse a path, so I wrote a little script that I'd like to share!</p>
<p><a href="https://gist.github.com/waveofbabies/d4d8e9cfeb47e358f62b" rel="nofollow noreferrer">https://gist.github.com/waveofbabies/d4d8e9cfeb47e358f62b</a></p>]]></description><link>http://screeps.com/forum/post/6336</link><guid isPermaLink="true">http://screeps.com/forum/post/6336</guid><dc:creator><![CDATA[Waveofbabies]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Path Reversing Script on Invalid Date]]></title><description><![CDATA[<p>Good, i comment small changes.</p>]]></description><link>http://screeps.com/forum/post/6337</link><guid isPermaLink="true">http://screeps.com/forum/post/6337</guid><dc:creator><![CDATA[abnessor]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Path Reversing Script on Invalid Date]]></title><description><![CDATA[<p>Thanks!  Wasn't too sure what the best way to avoid the if was.</p>]]></description><link>http://screeps.com/forum/post/6338</link><guid isPermaLink="true">http://screeps.com/forum/post/6338</guid><dc:creator><![CDATA[Waveofbabies]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Path Reversing Script on Invalid Date]]></title><description><![CDATA[<p>I found reversing directions handy in several circumstances. Now I wonder, on a larger scale, if an object lookup or a calculation is more CPU efficient... <img
      src="http://screeps.com/forum/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=a1k070tfs06"
      class="not-responsive emoji emoji-android emoji--wink"
      title=";)"
      alt="😉"
    /></p>
<pre><code>function reverse(dir){return (dir + 3)%8+1;}
reverse(LEFT);

vs
reverse:{TOP:BOTTOM,TOP_RIGHT:BOTTOM_LEFT,RIGHT:LEFT,BOTTOM_RIGHT:TOP_LEFT,BOTTOM:TOP,BOTTOM_LEFT:TOP_RIGHT,LEFT:RIGHT,TOP_LEFT:BOTTOM_RIGHT};
reverse[LEFT];
</code></pre>]]></description><link>http://screeps.com/forum/post/6339</link><guid isPermaLink="true">http://screeps.com/forum/post/6339</guid><dc:creator><![CDATA[chris]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Path Reversing Script on Invalid Date]]></title><description><![CDATA[<p>Good! Simple and useful!</p>]]></description><link>http://screeps.com/forum/post/6340</link><guid isPermaLink="true">http://screeps.com/forum/post/6340</guid><dc:creator><![CDATA[abnessor]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>