8 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

# C#, 242241238230222 219 Bytes

Spurred on by Martin's commentMartin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string p="",r=n==0?"O":p;if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else if(n<0){r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x = 0;
string p = "",
r = n==0 ? "O" : p;
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- > 2;) r += "/  ";
r += "O\n" + p;
}
else if(n<0) {
r += @" O
/ \
";
for (--x; x-- > n;) r += @"\ /
\
/ \
";
r += @"\ /
O";
}
return r;
}


# C#, 242241238230222 219 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string p="",r=n==0?"O":p;if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else if(n<0){r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x = 0;
string p = "",
r = n==0 ? "O" : p;
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- > 2;) r += "/  ";
r += "O\n" + p;
}
else if(n<0) {
r += @" O
/ \
";
for (--x; x-- > n;) r += @"\ /
\
/ \
";
r += @"\ /
O";
}
return r;
}


# C#, 242241238230222 219 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string p="",r=n==0?"O":p;if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else if(n<0){r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x = 0;
string p = "",
r = n==0 ? "O" : p;
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- > 2;) r += "/  ";
r += "O\n" + p;
}
else if(n<0) {
r += @" O
/ \
";
for (--x; x-- > n;) r += @"\ /
\
/ \
";
r += @"\ /
O";
}
return r;
}

7 "r" initialisation optimisation

# C#, 242241238230222222 219 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string r=""p="",p="";if(n==0)r="O";else ifr=n==0?"O":p;if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else if(n<0){r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x=0;x = 0;
string rp = "",
p           r = "";n==0 ? "O" : p;
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- >2;)
> 2;) r += "/  ";
r += "O\n"+p;"O\n" + p;
}
else if (n < 0n<0) {
r += @" O
/ \
";
for (--x; x-- > n;)
r += @"\ /
\
/ \
";
r += "\\@"\ /\n O";
}
else {
r = "O";O";
}
return r;
}


# C#, 242241238230222 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string r="",p="";if(n==0)r="O";else if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else{r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x=0;
string r = "", p = "";
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- >2;)
r += "/  ";
r += "O\n"+p;
}
else if (n < 0) {
r += @" O
/ \
";
for (--x; x-- > n;)
r += @"\ /
\
/ \
";
r += "\\ /\n O";
}
else {
r = "O";
}
return r;
}


# C#, 242241238230222 219 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string p="",r=n==0?"O":p;if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else if(n<0){r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x = 0;
string p = "",
r = n==0 ? "O" : p;
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- > 2;) r += "/  ";
r += "O\n" + p;
}
else if(n<0) {
r += @" O
/ \
";
for (--x; x-- > n;) r += @"\ /
\
/ \
";
r += @"\ /
O";
}
return r;
}

6 loop condition optimisations

# C#, 242241238230230 222 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string ih(int n){int x;stringx=0;string r="",p="";if(n==0)r="O";else if(n>0){for(x=0;x<n;x++;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(x=1;x<n;x++;x-->2;)r+="/  ";r+="O\n"+p;}else{r+=@" O
/ \
";for(x=-1;x>n;x-x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


private static string h(int n)
{
int x;x=0;
string r = "", p = "";
if (n == 0) r = "O";
else if (n > 0) {
for (x = 0;; xx++ < n; x++) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (x = 1;; x < n;-- x++>2;)
r += "/  ";
r += "O\n"+p;
}
else if (n < 0) {
r += @" O
/ \
";
for (x = -1;-x; x-- > n; x--)
r += @"\ /
\
/ \
";
r += @"\"\\ /
\n O";
}
else {
r = "O";
}
return r;
}


# C#, 242241238230 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string i(int n){int x;string r="",p="";if(n==0)r="O";else if(n>0){for(x=0;x<n;x++){r+=" /\\";p+=" \\/";}r+="\nO  ";for(x=1;x<n;x++)r+="/  ";r+="O\n"+p;}else{r+=@" O
/ \
";for(x=-1;x>n;x--)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


private static string h(int n)
{
int x;
string r = "", p = "";
if (n == 0) r = "O";
else if (n > 0) {
for (x = 0; x < n; x++) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (x = 1; x < n; x++)
r += "/  ";
r += "O\n"+p;
}
else {
r += @" O
/ \
";
for (x = -1; x > n; x--)
r += @"\ /
\
/ \
";
r += @"\ /
O";
}
return r;
}


# C#, 242241238230 222 Bytes

Spurred on by Martin's comment, here's my first attempt at something like this:

string h(int n){int x=0;string r="",p="";if(n==0)r="O";else if(n>0){for(;x++<n;){r+=" /\\";p+=" \\/";}r+="\nO  ";for(;x-->2;)r+="/  ";r+="O\n"+p;}else{r+=@" O
/ \
";for(--x;x-->n;)r+=@"\ /
\
/ \
";r+=@"\ /
O";}return r;}


string h(int n)
{
int x=0;
string r = "", p = "";
if (n > 0) {
for (; x++ < n;) {
r += " /\\";
p += " \\/";
}
r += "\nO  ";
for (; x-- >2;)
r += "/  ";
r += "O\n"+p;
}
else if (n < 0) {
r += @" O
/ \
";
for (--x; x-- > n;)
r += @"\ /
\
/ \
";
r += "\\ /\n O";
}
else {
r = "O";
}
return r;
}

5 deleted 11 characters in body
4 deleted 11 characters in body
3 deleted 68 characters in body
2 added 50 characters in body
1