Implementation of Langton's ant