The SetInvert function provides a convenient way to invert the direction of the motor commands.
nxt.SetInvert( invert );
nxt.SetInvert( true );