src/code.cpp
// move the turmite in the direction it is facing
move the turmite in the direction it is facing
move the turmite in the direction it is facing
void step(cpp11::writable::integers& position, int facing, int width, int height) {
  if(facing == 0) position[1]++;
  if(facing == 1) position[0]++;
  if(facing == 2) position[1]--;
  if(facing == 3) position[0]--;
  position[0] = trmt::wrap(position[0], width);
  position[1] = trmt::wrap(position[1], height);
}
void step ( cpp11 :: writable :: integers & position , int facing , int width , int height ) { if ( facing == 0 ) position [ 1 ] ++ ; if ( facing == 1 ) position [ 0 ] ++ ; if ( facing == 2 ) position [ 1 ] -- ; if ( facing == 3 ) position [ 0 ] -- ; position [ 0 ] = trmt :: wrap ( position [ 0 ] , width ) ; position [ 1 ] = trmt :: wrap ( position [ 1 ] , height ) ; }
move the turmite in the direction it is facing
move the turmite in the direction it is facing
// move