Drawing order of Objects in an Arraylist

The Lawn is underneath the stone when you first draw the lawn and then the stone.

You could give every object an Z value and

  • loop over the entire ArrayList and first draw all with 0 Z then
  • loop over the entire ArrayList again and draw all with Z 1
  • etc.

Or when you only have a small numbers of types, then just do the same and draw Lawn first, then draw Stone etc.

**Hey, and welcome to the forum! **

Great to have you here!