Include stdlib (for rand)
Use getTiles
Correctly instantiate event parameters
Correct indent