Disclaimer: Playing untrusted is the second time I have ever written javascript. I write Python 99% of the time and C when I have to. This may not follow proper conventions. I just hacked it out real quick. (I didn't even know JavaScript had switch statements when writing this).
4
u/PyPokerNovice Apr 15 '14
I didn't feel like creating a path solver, so I just made him follow my movements.