Langton's ant implemented in Javascript