I think it can be done fairly easily. Start with six players. Each player gets two "dunk" attempts. Just have the engine make each player take an inside shot vs. a generic defender with Proficient ID and Atrocious (0) SB. If the player misses then they get one additional chance to make it. If the player makes the shot then a random description of the dunk is given and the engine grades it based on how much success the shot made it by (assuming the game engine acts in such a way.)
Eliminate the two lowest scorers and have the remaining players do it again but this time give the generic defender a Prolific ID. Eliminate two more after that and have the final round include three dunks and be against a Tremendous defender. The highest total scored in the final round wins.