fixed tile rendering function

now you can input a multi-dimensional array instead of it taking one
direcly