Possible to make a lot of statements into one?

thanks but i already solved it for my way of use :smiley:

1 Like

Do this once:

interesting = new IntList(0, 3, 4, 9);

and later,

interesting.hasValue(terrainBase[playerxpos+ix-1][playerypos+iy])

1 Like

Like here I guess

if(  interesting.hasValue(terrainBase[playerxpos+ix-1][playerypos+iy])  ) {

}

Itโ€™s indeed wise not to convert int to string

Itโ€™s costly for the processor of the computer

is this giant? because i ran it on a 15 yo laptop and its fine.

1 Like

i mean i probaly will use the string method i used, but if its a great performance boost, ill change it.

When it runs fine so be it. Then you donโ€™t have to change your code.

Just remember that this could be a possible cause when your program might lag in the future.

Especially when you have multiple non optimal spots in your code. :wink:

Those might add up.