Monte-Carlo simulation of jets in heavy-ion collisions