Im developing a game based on a bunch of isometric tiles. I have the option to:
A:
for (i=0;i<numberoftiles;i++){
drawMap(canvas, i);
drawBuildings(canvas, i);
drawlivingbeings(canvas, i);
}
B:
for (i=0;i<numberoftiles;i++){
canvas.drawBitmap(maparray[i],.........)
canvas.drawBitmap(buildingsarray[i],.........)
canvas.drawBitmap(peoplearray[i],.........)
}
Option A has the advantage of splitting the code into smaller segments, following good coding practice
Option B saves having to pass the Canvas Object for hundreds of times.
Which approach should I choose in terms of efficiency?