Possible to make a lot of statements into one?

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

Do this once:

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

and later,

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

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.

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.